Skip to content

Tag: analytics

Three-table join with NO EXISTS

I have three tables and would like to answer the following question in SQL: “Who has only certifications that do NOT have scores?” For instance, in the setup below, the query would return “John” only. Joana has the “AWS Certification”, which is in SCORE table (id 57). Marry has the “ITIL V3 Certification” which is not in the SCORE table,

Determine growth in value in a specific time range

Given the following data set example, how should I structure my SQL query in order to determine if the value has grown over time (given a time range in the query) for a specific UserId by returning either a positive/negative growth percentage result or a true/false result UserId timestamp value 1 1617711825 350 1 1617711829 400 1 1617711830 450 5

Oracle SQL analytical query

SQL> select LAST_UPDATED_DATE, ODOMETER from demo; LAST_UPDA ODOMETER ——— ———- 05-OCT-18 47174.77 08-OCT-18 12-OCT-18 50246.37 15-OCT-18 19-OCT-18 53743.11 21-OCT-18 22-OCT-18 25-…