Skip to content

Tag: sql

SQL query returning 0 rows after adding extra INNER JOIN

The issue is simple to explain, but seemingly not so simple to solve. This SQL query returns 0 rows: This one, however, returns 1 row as I expected: The only difference is the lack of INNER JOIN with the org_depts table. What I want to be returned is all the column values from app_handover, which references s…

How to display only results matching a certain condition in SQL?

I would appreciate your help very much as I’m still at beginner level in SQL. Thank you 🙂 I have tables representing counties, vendors and their respective sales of stationery products. I have to display only the counties where the sum of all sales exceeds 100 without counting vendor 2 (Randall). For these co…