Projection and Selection Practice Questions:
Student
S_ID |
NAME |
Branch |
1 |
A |
CS |
2 |
B |
IT |
3 |
C |
CS |
4 |
D |
CS |
5 |
E |
EE |
6 |
F |
EC |
7 |
G |
EE |
- Find the names of all students from CS branch.
Π name (σ Branch = ‘CS’ (Student))
Account (account_no, branch_name, balance)
- Find those account numbers where balance is less than 1000.
Π account_no (σ balance<1000 (Account))
Loan(loan_no, branch_name, amount)
- Find those loan numbers which are from Delhi branch with amount greater than 1000.
Π loan_no (σ branch_name=’Delhi’ ^ amount>1000 (Loan))
Branch (Branch_name, Branch_city, assets)
- Find branch_name and branch_city with assets more than 100000.
Π branch_name , branch_city (σ assets>100000 (Branch))
No comments:
Post a Comment