how can i retrieve the first 10 rows of the firstnames (which is `prepodFamIO` ) found in the prepod table and the sum of the hours in a semester which is greatest the hours are found in plany table(which is `PAuditTime` ,given that the two information are in different tables.
i know if i want to select the first 10 rows of the first names i can run this query
Code:
select * from prepod
limit 30;
or
select * from prepod
where rownum <= 30;
and if i want to select the sum of hours which is greatest
Code:
SELECT MAX(PAuditTime)
AS LargestNumber
FROM plany
order by PAuditTime;
but how can i put them in one query ....i am using sql in access and ms sql thanks
this is a snapshot of my database but im only interested in tables plany and prepod which is on the right coner of the image