Skip to content

Instantly share code, notes, and snippets.

@jamesplease
Created February 23, 2017 17:45
Show Gist options
  • Save jamesplease/b0bd78860b7041ddc74ab69336828bef to your computer and use it in GitHub Desktop.
Save jamesplease/b0bd78860b7041ddc74ab69336828bef to your computer and use it in GitHub Desktop.
withIt "related_pizza_ids" AS (
SELECT
"topping_id",
array_agg("pizza_id") AS "pizza_id"
FROM "pizza_topping"
GROUP BY "topping_id"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment