You are on page 1of 3

SQL Development – Assessment

1. TableName : Person
Columns : Firstname, LastName, City, Qualification
select all the information of persons table that the firstname starts with A

2. Create a store procedure that receives the first name of the person table as
input and the last name as output.

3. Create a query to show the first_name and customerid from the customer
table for the customer without orders.

4. Create a function get the convert Fahrenheit to Celsius

5. Write a query to find out how many permanent candidate take salary more
than 5000
6. Use the above table and find out the total salary paid to permanent
employees
7. Table : Emp
Select the details of the employee who work either for department E-104 or
E-102
Em EmpN Depart EmpHe
EmailId
pid ame ment adId
isha@gmail.c
101 Isha E-101 105
om

priya@yahoo.
102 Priya E-104 103
com

neha@gmail.
103 Neha E-101 101
com

rahul@yahoo.
104 Rahul E-102 105
com

Abhis abhishek@g
105 E-101 102
hek mail.com

8. Table : EmpDept

DeptId DeptName Dept_off DeptHead


E-101 HR Monday 105
E-102 Development Tuesday 101

E-103 Hous Keeping Saturday 103


E-104 Sales Sunday 104
E-105 Purchage Tuesday 104
Use the table Emp and EmpDept table
Select the Employee whose Dept_off is Monday

9) Create temp table and push the result set obtained in the result (8)

10) Table Name : movie_streaming

id date movie director number_of_stre


1 4/1/2022 Fargo Coen brothers 495
2 4/1/2022 The Big Lebowski Coen brothers 512
3 4/1/2022 No Country for Old Men Coen brothers 270
Yorgos
4 4/1/2022 Dogtooth 157
Lanthimos
Yorgos
5 4/1/2022 The Lobster 247
Lanthimos
The Killing of a Sacred Yorgos
6 4/1/2022 320
Deer Lanthimos
7 4/2/2022 Fargo Coen brothers 321
8 4/2/2022 The Big Lebowski Coen brothers 905
9 4/2/2022 No Country for Old Men Coen brothers 308
Yorgos
10 4/2/2022 Dogtooth 233
Lanthimos
Yorgos
11 4/2/2022 The Lobster 405
Lanthimos
The Killing of a Sacred Yorgos
12 4/2/2022 109
Deer Lanthimos

a. Find the total number of streams by date


b. Find the total number of streams by date and director. Show only dates
with a total number of streams above 740.

You might also like