If I have these tables:table "claimers" user_number | claim_key-------------+---------- 1 | 1 2 | 2 2 | 3(3 rows)table "items" item_id | pkey -----------+------ 3 | 1 3 | 2 3 | 3 4 | 5 4 | 6 4 | 7(6 rows)
How does one does view all entries in items such that when the pkey is claimed in claimers the corresponding user_number is displayed and when not claimed (used), some default value is shown?(A select statement with "claim_key=pkey" will fail for unclaimed entries or vice-versa, and a statement without such conditional will miss any available info at all)Such that a table that looks like this becomes the result? item_id | pkey | user_number-----------+------+------------ 3 | 1 | 1 3 | 2 | 2 3 | 3 | 2 4 | 5 | - 4 | 6 | - 4 | 7 | -(6 rows)