Category: Blog
-
Oracle SQL JOIN Types – Part 2

365 Days Of Daily Coding: Day 19 Continuing with the Oracle SQL Join Types- Part 1 series, I have listed down the other 6 ‘JOIN’ types in SQL. 5. SEMI JOIN “A semi-join is not the same thing at all: it returns a set of rows in one table that is constrained by the existence of data…
-
Oracle SQL JOIN Types – Part 1

365 Days Of Daily Coding: Day 18 Today’s blog post is rather different. I will not be doing any challenges today but it’s about understanding different ‘JOIN’ types out there. Understanding the workings of ‘JOIN’ types is fundamental to using SQL efficiently. Firstly, because it’s usage is required frequently if you are required to query…
-
Advance SQL Challenge 1: Using WINDOWS() and JOIN() Function

365 Days of Coding: Day 17 Today I solved a hard SQL leetcode challenge. I failed in one of the test case and I can’t seem to explain the reason why it failed. Challenge: Give a table called ‘Employee’ and ‘Department’, I had to find out top 3 highest paying employees in each department. Table:…
-
Medium SQL Challenge: Using GROUP BY and HAVING

365 Days of Daily Coding: Day 16 Since today is a weekend, I had extra time to complete more challenges today unlike weekdays. Challenge 1: Given a table ‘World’ with ‘name’, ‘continent’, ‘area’, ‘population’ and ‘gdp’, I had to find out the countries that had population larger than 25 million or area bigger than 3…
-
365 Days of Daily Coding: Day 15

Todays leetcode challenge was about handling ‘NULL’ by finding the second highest salary from table called ‘Employee’ with columns ‘ID’ and ‘Salary’. Table ‘Employee’ Id Salary 1 300 2 100 3 200 Sample of the table ‘Employee’ Expected Output: Salary 200 Sample of the expected output My Failed Solution: Although, using the windows function did…
-
365 Days of Daily Coding: Day 14

Today’s leetcode challenge was with regards to handling dates in database. Given the table ‘Weather’, I had to find out the dates that had higher temeperature than the previous dates. Table: Weather id recordDate temperature 1 2015-01-01 10 2 2015-01-02 25 3 2015-01-03 20 4 2015-01-04 30 Sample of the table ‘Weather’ Expected Output: id…
-
365 Days of Daily Coding: Day 13

13th Day, Wohooo! Let’s go. I had three different solution for my Leetcode challenge today. Amazing, isn’t it? From having to scavenge the discussion forums to actually coming up with 3 different solution marks a great achivement for me. Challenge: Give two tables, Customers and Orders, I had to find the customers who never ordered.…
-
365 Days of Daily Coding: Day 12

It’s day 12 and my daily coding ritual is still going strong. I am feeling ecstatic today since I was able to solve a piece of work that involved using SQL which proves that my practice is yielding result. Today’s Leetcode challenge: Given a table with Id no. and email address, I had to find…
-
365 Days of Daily Coding: Day 11

I did an easy Leetcode challenge today. For the moment, I am quite happy with Leetcode cause the challenges although easy is helping me understand the basic concepts very well. I think for the start I will stick to doing easy challenges and then move on to doing medium challenges to curb my frustration of…
-
365 Days of Daily Coding: Day 10

Today’s leetcode challenge was very challenging. It’s frustrating to not be able to answer at the same time not easily be able to understand other sucessful submissions. Given a table, I had to find out the numbers that were repeated three times consecutively. Id Num 1 1 2 1 3 1 4 2 5 1…