Practise SQL Questions
Practise SQL Questions
Table – COURSE
CID CNAME FEES STARTDATE TID
C201 AGDCA 12000 2019-07-02 101
C202 ADCA 15000 2019-07-15 103
C203 DCA 10000 2020-01-13 102
C204 DDTP 2019-09-15 104
i.Display the trainer and course names of all the courses that began in the
year 2020.
ii.Display the name and fee of the course(s) being taught by ‘Deepti’.
iii.Display the name and salary of the trainers who are taking the ‘O Level’
course.
iv.Display the trainer name, course name and fee of all the courses available
in ‘Mumbai or ‘Delhi’ and fee column should not be empty
v.Display trainer name, hire date, course name and course start date of all
those courses whose fees is more than or equal to 10000 but less than or
equal to1800.
vi.Print maximum salary of trainers for each city only if no. of trainers is more than 2
in the cities.
vii.Add primary key constraint to TID of trainer.
viii.Remove the column city.
ix.Insert a row in trainer with following values:
tid=107,tname=megha,city=ranchi,hiredate=2005-11-24