How to write this SQL? Urgent!!!# Database - 数据库
c*l
1 楼
If I have two relations:
Employee(SSN, salary, name) SSN is primary key
Position(pID, pName, state) pID is primary key, state is the US state in
which a position released
And one relationship which link the two tables:
EP(SSN, pID, tDate) SSN, pID is primary key. tDate is the date on which
position was taken
Now I wanna write a SQL to retrieve data that meet requirement below from the
database: List the last four positions that took place in Illinois
Please give my some ideas, thank
Employee(SSN, salary, name) SSN is primary key
Position(pID, pName, state) pID is primary key, state is the US state in
which a position released
And one relationship which link the two tables:
EP(SSN, pID, tDate) SSN, pID is primary key. tDate is the date on which
position was taken
Now I wanna write a SQL to retrieve data that meet requirement below from the
database: List the last four positions that took place in Illinois
Please give my some ideas, thank