Sample Header Ad - 728x90

Select object from first table, who doesn`t have true in second

0 votes
3 answers
54 views
I have table with objects | uuid | name | | -------- | -------------- | | 98665e5a-e1cb-4bf7-93fa-a8d13983f358 | object | and another table with information about enabled this object and another object together | uuid_from_table_upper | enabled | uuid_another_object| | -------- | -------------- | -------------- | | 98665e5a-e1cb-4bf7-93fa-a8d13983f358 | true |ad5e670a-adac-485b-879e-9448d68a393c| | 98665e5a-e1cb-4bf7-93fa-a8d13983f358 | false | a55b021b-ae4b-4373-91ae-87b9f7134862| i need a sql query, return object from first table object, who doesn`t have true in second table
SELECT ft.* 
FROM first_table ft 
  JOIN second_table st on ft.uuid = st.uuid_from_table_upper
WHERE
  not st.enabled;
i guess needed group by or recursive with
Asked by smdsa1337 (5 rep)
Aug 28, 2024, 07:42 AM
Last activity: Sep 3, 2024, 08:44 AM