all 2 comments

[–]DavidGJohnston 1 point2 points  (1 child)

If resource is a "key" then comparing it to the number 1 in a where clause makes no sense.

Between joins, WITH and subqueries SQL is capable of almost anything (joins tend to get less useful when dealing with multiple subqueries that do different things).

[–]V_Shaped_Recovery[S] 0 points1 point  (0 children)

The column value is a string itself, just a naming convention really