Skip to content

Instantly share code, notes, and snippets.

@monolighter
monolighter / query.sql
Created November 14, 2019 17:07
Yo, optimize dat shit bruh, let's find a nice solution. Any comments are welcome, e.g. database storage type.
(
select *
from `entity`
where
`id` = 1
and `subid` not in (3, 2, 1)
) union all (
select *
from `entity`