Skip to content

Latest commit

 

History

History
56 lines (50 loc) · 4.1 KB

File metadata and controls

56 lines (50 loc) · 4.1 KB

SQL Functions with Interview Question Links

Window Functions

Function Question Links
ROW_NUMBER() 3832-Find-users-with-persistent-user-patterns.md, 22__most_expensive_order_per_user_ranked_overall.md, 03_find_users_who_made_their_second_purchase_within_30_days_of_their_first.md, 01_row_number_vs_rank_vs_dense_rank.md, 00_SQL_Scripts_Window_Function_Part1.md
RANK() 184-Department-Highest-Salary.md, 31_Most Recent Three Orders.md, 23_highest_grossing_product_per_country_top_2.md, 26_Find the most experienced employee for each project.md, Readme.md
DENSE_RANK() 1875-Group-Employees-with-Same-Salary_.md, 185-Department-Top-3-Salaries.md, 178-Rank-Scores.md, 04_users_with_second_purchase.md, 04_Amazon_SQL_DA_Questions.md
NTILE() SQL_Functions_Reference.md
PERCENT_RANK() SQL_Functions_Reference.md
CUME_DIST()
NTH_VALUE()

Advanced Window Functions

Function Question Links
FIRST_VALUE()
LAST_VALUE()
LAG()
LEAD()
SUM() OVER()
AVG() OVER()
COUNT(*) OVER()

Date & Time Functions

Function Question Links
EXTRACT()
DATE_FORMAT()
CURRENT_DATE()
DATEDIFF()
DATE + INTERVAL 7 DAY
RANGE BETWEEN (rolling windows)
DATE_TRUNC()
Past N Days (e.g., CURRENT_DATE - INTERVAL 7 DAY)

Subquery Patterns

Pattern Question Links
(none listed)

Join Patterns

Pattern Question Links
Anti-Join
Derived Table
Scalar Lookup
Self-Join
Cross-Join
Left Join Filtering Gotcha

Casting Functions

Function Question Links
CAST(date)
CAST(varchar)