Created
February 16, 2021 05:36
-
-
Save mreigen/3e9bbc652f3d772ef4c7c7ce7064ecd7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ecto.Query | |
... | |
from(store in Store, | |
where: fragment("NOT EXISTS (SELECT * FROM APPLIANCES item WHERE item.store_id == ? AND item.name == 'VCR player')", store.id), | |
where: fragment("NOT EXISTS (SELECT * FROM GAME_CONSOLES item WHERE item.store_id == ? AND item.name == 'Sega Genesis console')", store.id), | |
where: fragment("NOT EXISTS (SELECT * FROM DELIVERY_TRUCKS truck WHERE truck.store_id == ?)", store.id) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment