Tutor SQL Profile
Tutor SQL

@TutorSql

Followers
26
Following
3
Media
23
Statuses
34

Find answers to commonly asked SQL interview questions.

Joined July 2023
Don't wanna be here? Send us removal request.
@TutorSql
Tutor SQL
1 year
How can you find the 3rd highest salary in Oracle using an analytic function? #DenseRank #SQL #TutorSQL #Oracle #Analytics #Database #DataAnalyst #DataScientist
0
0
0
@TutorSql
Tutor SQL
2 years
Q9: Write an SQL query using CASE to calculate the grade for each student: If the avg of math and science scores is greater than or equal to 90, assign A grade. If the avg is between 80 & 89, assign B grade If the avg is between 70 & 79, assign C grade Otherwise, assign 'D'.
0
0
1
@connor_mc_d
Connor on SQL and Database
2 years
The database optimizer never ceases to blow my mind. TIL that we can refactor some DECODEs into simpler expressions. #database #sql πŸ”₯
4
10
75
@TutorSql
Tutor SQL
2 years
If you find these interview questions helpful and insightful, consider following us on Twitter for more engaging content and valuable insights into SQL and database-related topics! πŸ“šπŸ”#SQLInterviewQuestions #TechInterviews #DatabaseSkills #FollowUs #InterviewPractice #SQLCoding
1
0
0
@TutorSql
Tutor SQL
2 years
We calculate the percentage growth by subtracting the previous month's sales from the current month's sales, dividing by the previous month's sales, and multiplying by 100. The ROUND function round the percentage growth to two decimal places.
1
0
0
@TutorSql
Tutor SQL
2 years
In this query, we use the LEAD and LAG functions to access values from the previous and next rows. The PARTITION BY clause is used with LEAD and LAG to calculate the values within each partition of the specified column (in this case, product_id).
1
0
0
@TutorSql
Tutor SQL
2 years
Q8: Write an SQL query to calculate the month-over-month percentage growth for each product's sales. You should retrieve the product_id, sale_date, and percentage growth from the previous month's sales using the LEAD and LAG functions.
1
0
0
@TutorSql
Tutor SQL
2 years
Protip: 😎 Do you know that using the LEAD and LAG functions effectively and considering both the PARTITION BY and ORDER BY clauses, you can perform robust time-based and comparative analysis on your data in Oracle SQL. πŸš€
0
1
0
@TutorSql
Tutor SQL
2 years
If you find these interview questions helpful and insightful, consider following us on Twitter for more engaging content and valuable insights into SQL and database-related topics! πŸ“šπŸ” #SQLInterviewQuestions #TechSkills #SQLCoding #SQLTips #DataSorting #InterviewPractice
0
0
0
@TutorSql
Tutor SQL
2 years
The expected output values are for illustrative purposes and may vary based on the provided data.) #OracleSQLInterview #RowNumTechnique #FetchClause #TopNRows #OrderBy #SQLLimitEquivalent #QueryChallenge #InterviewPrep #DatabaseSkills #TechInterviews #SQLQueries #DataRetrieval
1
0
0
@TutorSql
Tutor SQL
2 years
Here's the SQL query to solve the same interview question using the FETCH clause in Oracle. The FETCH FIRST 3 ROWS ONLY clause limits the result set to the first 3 rows after sorting the rows in ascending order based on the "price" column using the ORDER BY clause.
1
0
0
@TutorSql
Tutor SQL
2 years
The inner query retrieves all rows from the "products" table and sorts them in asc order based on the "price" using the ORDER BY clause. The outer query then selects the rows from the result of the inner query where the ROWNUM is <= 3, limiting to the top 3 cheapest products.
1
0
0
@TutorSql
Tutor SQL
2 years
Q7: In Oracle SQL, the LIMIT function is unavailable, but there's an equivalent approach using the ROWNUM technique. Consider a table named "products" as per the screenshot. Write an SQL query to retrieve the top 3 cheapest products using the ROWNUM technique (equi. to LIMIT).
1
0
0
@bhutanisanyam1
Sanyam Bhutani
2 years
A master class in creating Synthetic datasets with LLMs! 🐐 ToolLLM paper has been popular for creating the strongest API following models. I think there’s an incredibly underrated side to it, here’s my summary: - The paper aims to improve API following capabilities of open
3
37
220
@TutorSql
Tutor SQL
2 years
The result displays the "event_id," "event_date," and the extracted hours, minutes, and seconds from the "event_date" column in the specified format with leading zeros as required. #tutorsql #to_char
1
0
0
@TutorSql
Tutor SQL
2 years
The TO_CHAR function extracts and formats the hours, minutes, and seconds from the "event_date". The 'HH24' format specifier extracts the hours in 24-hour format with leading zeros, 'MI' extracts the minutes with leading zeros, and 'SS' extracts the seconds with leading zeros.
1
0
0
@TutorSql
Tutor SQL
2 years
Question #6: Imagine you have a table named "events" with the attached structure and data: Write an SQL query to extract the hours, minutes, and seconds from the "event_date" column and display them in separate columns in the result set. Hint: Use the TO_CHAR function.
1
0
0