SQL related questions
Number of rows in the result
Question
Differentiate between Union, Minus and Intersect
Question
Extract domain name from email id
Question
Every email id is like
[email protected]
in progress
0
SQL
55 years
7 Answers
1211 views
Grand Master
How do you pivot in SQL without using pivot function or any window function?
Question
Get the third highest salary using 3 different approaches
Question
There are multiple methods to get the 3rd maximum salary.
Whenever an interviewer asks you to write a query of this nature, it is bound to be followed up by questions like 'Well, this is good but can you think of ...
in progress
1
SQL
55 years
10 Answers
1603 views
Grand Master
Get the time for which a driver has logged into the driving app | Ola interview question
Question
Following is the table structure, I am running the code at 10 am on 26th May 2021
Driver_id , status, timestamp
123,Logged_in,24/05/2021 7:00 am
123,Logged_out,24/05/2021 19:00 pm
234,Logged_in,25/05/2021 6:00 am
234,Logged_out,25/05/2021 7:00 am
234,Logged_in,26/05/2021 9:00 am
Output
123 - 24/05/2021- 12 hrs
234 - ...
solved
1
SQL
55 years
5 Answers
993 views
Grand Master
Calculate the cumulative multiplication
Question
Calculating sum is somewhat easy(though we will surely this in another question).
We have 4 rows in a table T with column x
2
3
5
10
Output
2
6
30
300
solved
3
SQL
55 years
18 Answers
1584 views
Grand Master
Count of duplicate rows in SQL
Question
I have a table student with only one column i.e. Roll No.
The values in the table are
10
20
10
10
20
There are in total 3 repetitive values i.e. 10 is repeated two extra times and 20 is repeated one ...
solved
6
SQL
55 years
62 Answers
2385 views
Grand Master
SQL question
Question
Anonymous
Suppose a employee timesheet table is given, which has attributes emp_id, emp_status (IN/OUT only), swipe_time(which records date and time both when the card is swiped). Write a SQL query to find total number of employees who are inside the office ...
in progress
0
SQL
Anonymous
55 years
1 Answer
1223 views
Find the 4th Highest employee salary from the following table
Question