SQL Query Average in Microsoft Access

前端 未结 1 1296

Here is the table:

Faculty:

    School_ID char(3), 
    Fac_LastName char(15), 
    Fac_FirstName char(15), 
    Fac_DOB char(15), 
    Fac_SS# char(15),         


        
相关标签:
1条回答
  • 2021-01-28 10:49

    Assuming that the comparative average is for all records in table FACULTY, you will need to calculate the overall average separately, before you can determine which members exceed this average.

    You can do this like so:

    SELECT FACULTY.Fac_LastName, FACULTY.Fac_salary
    FROM FACULTY
    WHERE ((FACULTY.Fac_salary) > (SELECT Avg(FACULTY.Fac_salary) FROM FACULTY));
    
    0 讨论(0)
提交回复
热议问题