Thread
" Learn how to Write SQL Queries " 🤖

🧵
👨‍💻 Learning SQL syntax is very easy but getting comfortable in writing SQL Queries, especially the complex SQL Queries can be tricky and will need a lot of practice.

9⃣ SQL Queries which should help you to practice intermediate to complex SQL queries.
1️⃣ Write SQL Query to fetch all duplicate record in a table
2️⃣ Write SQL query to fetch the second last record from employee table
3️⃣ Write SQL query to display only detail of employees who either earn the highest salary or lowest salary in each department from the employee table
4️⃣ From the doctors table, fetch the details of doctors who work in the same hospital but in different specialty.
5️⃣ From the login_details table, fetch the users who logged in consecutively 3 or more times.
6⃣. From the students table, write a #SQL query to interchange the adjacent student names.
7⃣ From the weather table, fetch all the records when London had extremely cold temperature for 3 consecutive days or more.
8⃣ From the following 3 tables (event_category, physician_speciality, patient_treatment), write a #SQL query to get the histogram of specialties of the unique physicians who have done the procedures but never did prescribe anything
Mentions
See All