Skip to content

Instantly share code, notes, and snippets.

@renzok
Created May 1, 2015 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renzok/2e776ee0dd98da7225dd to your computer and use it in GitHub Desktop.
Save renzok/2e776ee0dd98da7225dd to your computer and use it in GitHub Desktop.
sql array based search
@renzok
Copy link
Author

renzok commented May 5, 2015

WHERE amount Between minPrize and maxPrize
AND diameter = size

group by p.pizzaid, p.name, p.calzone,
i.imageid, i.url, i.copyrightshort, i.copyrightlong, amount,diameter,curcurrency
)
select *
from pizzas p
where toppings @> Array[ String[0], String[1]] -- in etwa so
order by pizzaid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment