And, more importantly, what is your DB design?
If you only have one table, not at least two tables and probably three or more, then it's a bad design that will only be made worse by trying to do this query.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.