Q:

List school name in more than 2 states based on student loan

tbl1: schID, SChName
tbl2: SchID, stuid, city, state, loan_purpose, Action
I have two tables, tbl1 lists school ids and school names, and tbl2 lists studentid, loan purpose and action taken by school.
I need help with writing a query to list school names that accepted 
applications in more than 2 states (when loan type = "FS" and action is "A).

A:

 select SCHName FROM(
    select tbl1.schname, count(*) FROM 
 tbl1 INNER JOIN tbl2 on tbl1.SCHID = tbl2.SCHID 
 WHERE tbl2.loan_purpose = 'FS' AND tbl2.ACTION = 'A'
 GROUP BY SCHName
HAVING count(*) > 2
                    )

