SQL Questions PDF
SQL Questions PDF
Time: 20 minutes
Send back your answer script by replying back to the email : [email protected]
1. Write the SQL statement for creating a table named “ country_data” containing the
attributes sequentially as Voter ID no, Name, Date_of_birth, Age, Height, Address,
Contact_number, Annual_earning, whereby the attributes Voter ID and Name are primary
keys of a table named “population_data” and attributes Address and Contact_number are
connected with a table named “contact_data”.
2. Table : Instructor
For the above table, make a query statement to find out names and salary of the instructors in a
sequential manner of salary, who are high in ranked and sit in a building named similar as Jackson.
3. Table: Population_data
Table: Country_data
ID District Age
12 Dhaka 35
13 Dhaka 36
14 Dhaka 32
15 Dhaka 30
For the above tables, write a query statement to find out the IDs, number of names ,
number of locations, maximum age of those people who are living in Mirpur and Dhanmondi
having a monthly salary more than 10,000 and ages ranges from 30 and 40 in a descending manner
of ID.
Mid Term Exam
Time: 20 minutes
Send back your answer script by replying back to the email : [email protected]
4. Table: Population_data
Table: Country_data
ID District Age
12 Dhaka 35
13 Dhaka 36
14 Dhaka 32
15 Dhaka 30
For the above tables, write a query statement if you want to find out the names, ID, annual
salary, total amount of salary, number of districts, average age in each location, of those people
who are living in Dhaka district.