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…

Scenarios andsSteps “get last change” problem

I have following table abstracting some scenarios and their steps ordered by START_DATE “desc”. SCENARIO_KEY STEP_KEY START_DATE END_DATE PREVIOUS_SCENARIO_KEY PREVIOUS_STEP_KEY 128 44 20xx04x4 0 120 44 120 44 20xx03x3 20xx04x4 120 38 120 38 20xx11x0 20xx03x3 121 38 121 38 20xx07x2 20xx11x0 120 44…

Python Pandas non equal join

Have table OUT Need: so i need make non equal join equivalent SQL query : or as SQL query: The problem in PANDAS is that NON EQUAL SELF JOIN cannot be done with MERGE. And I can’t find another way….. Answer We can solve this in pandas in a smarter way by using groupby with agg and joining the stri…