{"id":23144088,"url":"https://github.com/ereh11/datelemur-sql-interview-questions","last_synced_at":"2026-05-30T15:01:26.679Z","repository":{"id":111798425,"uuid":"558140679","full_name":"Ereh11/DateLemur-SQL-Interview-Questions","owner":"Ereh11","description":"My solutions for #Datalemur SQL Interview Questions","archived":false,"fork":false,"pushed_at":"2025-09-28T08:50:29.000Z","size":236,"stargazers_count":24,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-28T10:25:29.864Z","etag":null,"topics":["data-analysis","datalemur","exploratory-data-analysis","postgresql","sql-query"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ereh11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-27T01:04:54.000Z","updated_at":"2025-09-28T08:50:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"5669aad1-86af-4fcf-94bb-c62946fa9c5d","html_url":"https://github.com/Ereh11/DateLemur-SQL-Interview-Questions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ereh11/DateLemur-SQL-Interview-Questions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ereh11%2FDateLemur-SQL-Interview-Questions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ereh11%2FDateLemur-SQL-Interview-Questions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ereh11%2FDateLemur-SQL-Interview-Questions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ereh11%2FDateLemur-SQL-Interview-Questions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ereh11","download_url":"https://codeload.github.com/Ereh11/DateLemur-SQL-Interview-Questions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ereh11%2FDateLemur-SQL-Interview-Questions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33696683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-analysis","datalemur","exploratory-data-analysis","postgresql","sql-query"],"created_at":"2024-12-17T15:14:51.055Z","updated_at":"2026-05-30T15:01:26.673Z","avatar_url":"https://github.com/Ereh11.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"![Project Logo](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/Resources/datalemurcover.jpg)\n\n---\n\n\u003ch4 align=\"center\"\u003eSolutions for \u003ca href=\"\" target=\"_blank\"\u003eSQL\u003c/a\u003e Challenges hosted on \u003ca href=\"https://datalemur.com?referralCode=hRH4ho3l\" target=\"_blank\"\u003eDataLemur\u003c/a\u003e \u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#overview\"\u003eOverview\u003c/a\u003e •\n  \u003ca href=\"#content\"\u003eContents\u003c/a\u003e •\n\u003c/p\u003e\n\n## 🔎Overview\n\nThis repository contains my solutions for the SQL challenges posted on [DataLemur](https://datalemur.com/sql-interview-questions) website. The solution queries are executed on the integrated PostgreSQL environment on the same website.\n\n## 🎯Content\n\nThe repository directory structure is as follows:\n\n**DataLemur-SQL-Challenges:**\n\nThis directory contains the solution PostgreSQL scripts for the challenges mentioned in the **Solution Scripts** table.\n\nIn the below table, the columns indicate the following attributes related to the challenge:\n\n- **ID :** Identity column for individual challenge\n- **Challenge :** Link to the SQL challenge hosted on [DataLemur](https://datalemur.com/sql-interview-questions)\n- **Solution Script :** Link to the solution SQL script hosted in this repository\n\n#### Difficulty Level: Easy\n\n| ID  | Challenge                                                                                   |                                                                         Solution Script                                                                         |\n| :-: | ------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| 01  | [Cities With Completed Trades](https://datalemur.com/questions/completed-trades)            |     [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Cities%20With%20Completed%20Trades.sql)      |\n| 02  | [Page With No Likes](https://datalemur.com/questions/sql-page-with-no-likes)                |          [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Page%20With%20No%20Likes.sql)           |\n| 03  | [Laptop vs Mobile Viewership](https://datalemur.com/questions/laptop-mobile-viewership)     |     [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Laptop%20vs.%20Mobile%20Viewership.sql)      |\n| 04  | [Teams Power Users](https://datalemur.com/questions/teams-power-users)                      |            [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Teams%20Power%20Users.sql)            |\n| 05  | [Highest Number of Products](https://datalemur.com/questions/sql-highest-products)          |      [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Highest%20Number%20of%20Products.sql)       |\n| 06  | [Histogram of Tweets](https://datalemur.com/questions/sql-histogram-tweets)                 |           [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Histogram%20of%20Tweets.sql)           |\n| 07  | [Spare Server Capacity](https://datalemur.com/questions/sql-spare-server-capacity)          |          [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Spare%20Server%20Capacity.sql)          |\n| 08  | [Duplicate Job Listings](https://datalemur.com/questions/duplicate-job-listings)            |         [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Duplicate%20Job%20Listings.sql)          |\n| 09  | [Average Post Hiatus (Part 1)](https://datalemur.com/questions/sql-average-post-hiatus-1)   |   [Solution](\u003chttps://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Average%20Post%20Hiatus%20(Part%201).sql\u003e)    |\n| 10  | [App Clickthrough Rate (CTR)](https://datalemur.com/questions/sql-app-ctr)                  |    [Solution](\u003chttps://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/App%20Click-through%20Rate%20(CTR).sql\u003e)     |\n| 11  | [LinkedIn Power Creators (Part 1)](https://datalemur.com/questions/linkedin-power-creators) | [Solution](\u003chttps://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/LinkedIn%20Power%20Creators%20(Part%201).sql\u003e)  |\n| 12  | [Data Science Skills](https://datalemur.com/questions/matching-skills)                      |           [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Data%20Science%20Skills.sql)           |\n| 13  | [Final Account Balance](https://datalemur.com/questions/final-account-balance)              |          [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Final%20Account%20Balance.sql)          |\n| 14  | [Average Review Ratings](https://datalemur.com/questions/sql-avg-review-ratings)            |         [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Average%20Review%20Ratings.sql)          |\n| 15  | [Unfinished Parts](https://datalemur.com/questions/tesla-unfinished-parts)                  |             [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Unfinished%20Parts.sql)              |\n| 16  | [Ad Campaign ROAS](https://datalemur.com/questions/ad-campaign-roas)                        |            [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Ad%20Campaign%20ROAS.sql)             |\n| 17  | [Second Day Confirmation](https://datalemur.com/questions/second-day-confirmation)          |         [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Second%20Day%20Confirmation.sql)         |\n| 18  | [Apple Pay Volume](https://datalemur.com/questions/apple-pay-volume)                        |            [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Apple%20Pay%20Volume.sql)             |\n| 19  | [Average Deal Size (Part 1)](https://datalemur.com/questions/sql-average-deal-size)         |    [Solution](\u003chttps://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Average%20Deal%20Size%20(Part%201).sql\u003e)     |\n| 20  | [Top Rated Businesses](https://datalemur.com/questions/sql-top-businesses)                  |          [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Top%20Rated%20Businesses.sql)           |\n| 21  | [Patient Support Analysis (Part 1)](https://datalemur.com/questions/frequent-callers)       | [Solution](\u003chttps://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Patient%20Support%20Analysis%20(Part%201).sql\u003e) |\n| 22  | [Pharmacy Analytics (Part 2)](https://datalemur.com/questions/non-profitable-drugs)         |     [Solution](\u003chttps://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Pharmacy%20Analytics%20(Part%202).sql\u003e)     |\n| 23  | [Pharmacy Analytics (Part 3)](https://datalemur.com/questions/total-drugs-sales)            |     [Solution](\u003chttps://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Pharmacy%20Analytics%20(Part%203).sql\u003e)     |\n| 24  | [Cards Issued Difference](https://datalemur.com/questions/cards-issued-difference)          |         [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Cards%20Issued%20Difference.sql)         |\n| 25  | [Compressed Mean](https://datalemur.com/questions/alibaba-compressed-mean)                  |              [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Compressed%20Mean.sql)              |\n| 26  | [Well Paid Employees](https://datalemur.com/questions/sql-well-paid-employees)              |           [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Easy/Well%20Paid%20Employees.sql)           |\n\n#### Difficulty Level: Medium\n\n| ID  | Challenge                                                                                      |                                                                        Solution Script                                                                         |\n| :-: | ---------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| 01  | [User's Third Transaction](https://datalemur.com/questions/sql-third-transaction)              |       [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/User's%20Third%20Transaction.sql)       |\n| 02  | [Compensation Outliers](https://datalemur.com/questions/compensation-outliers)                 |         [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Compensation%20Outliers.sql)          |\n| 03  | [Sending vs. Opening Snaps](https://datalemur.com/questions/time-spent-snaps)                  |     [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Sending%20vs.%20Opening%20Snaps.sql)      |\n| 04  | [Tweets' Rolling Averages](https://datalemur.com/questions/rolling-average-tweets)             |       [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Tweets'%20Rolling%20Averages.sql)       |\n| 05  | [Odd and Even Measurements](https://datalemur.com/questions/odd-even-measurements)             |     [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Odd%20and%20Even%20Measurements.sql)      |\n| 06  | [Highest-Grossing Items](https://datalemur.com/questions/sql-highest-grossing)                 |         [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Highest-Grossing%20Items.sql)         |\n| 07  | [First Transaction](https://datalemur.com/questions/sql-first-transaction)                     |           [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/First%20Transaction.sql)            |\n| 08  | [Top 5 Artists](https://datalemur.com/questions/top-fans-rank)                                 |            [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Top%205%20Artists.sql)             |\n| 09  | [Signup Confirmation Rate](https://datalemur.com/questions/signup-confirmation-rate)           |        [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Signup%20Activation%20Rate.sql)        |\n| 10  | [Supercloud Customer](https://datalemur.com/questions/supercloud-customer)                     |          [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Supercloud%20Customer.sql)           |\n| 11  | [Histogram of Users and Purchases](https://datalemur.com/questions/histogram-users-purchases)  | [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Histogram%20of%20Users%20and%20Purchases.sql) |\n| 12  | [Card Launch Success](https://datalemur.com/questions/card-launch-success)                     |         [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Card%20Launch%20Success.sql)          |\n| 13  | [Compressed Mode](https://datalemur.com/questions/alibaba-compressed-mode)                     |            [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Compressed%20Mode.sql)             |\n| 14  | [International Call Percentage](https://datalemur.com/questions/international-call-percentage) |    [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/International%20Call%20Percentage.sql)     |\n| 15  | [Best-Selling Product](https://datalemur.com/questions/best-selling-products)                  |          [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Best-Selling%20Product.sql)          |\n| 16  | [NYC Area Code](https://datalemur.com/questions/nyc-area-code)                                 |            [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/NYC%20Area%20Code.sql)             |\n| 17  | [Second Highest Salary](https://datalemur.com/questions/sql-second-highest-salary) |[Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Second%20Highest%20Salary.sql)             |\n| 18  | [Second Highest Salary](https://datalemur.com/questions/sql-top-three-salaries) |[Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Top%20Three%20Salaries.sql)             |\n| 19  | [Swapped Food Delivery](https://datalemur.com/questions/sql-swapped-food-delivery) |[Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Medium/Swapped%20Food%20Delivery.sql)             |\n\n#### Difficulty Level: Hard\n\n| ID  | Challenge                                                                            |                                                                     Solution Script                                                                      |\n| :-: | ------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| 01  | [Active User Retention](https://datalemur.com/questions/user-retention)              |      [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Hard/Active%20User%20Retention.sql)       |\n| 02  | [Y-on-Y Growth Rate](https://datalemur.com/questions/yoy-growth-rate)                |        [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Hard/Y-on-Y%20Growth%20Rate.sql)        |\n| 03  | [Advertiser Status](https://datalemur.com/questions/updated-status)                  |         [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Hard/Advertiser%20Status.sql)          |\n| 04  | [Median Google Search Frequency](https://datalemur.com/questions/median-search-freq) | [Solution](https://github.com/Ereh11/DateLemur-SQL-Interview-Questions/blob/main/DataLemur-SQL-Challenges/Hard/Median%20Google%20Search%20Frequency.sql) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fereh11%2Fdatelemur-sql-interview-questions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fereh11%2Fdatelemur-sql-interview-questions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fereh11%2Fdatelemur-sql-interview-questions/lists"}