Skip to content
Advertisement

SQL Browser Crashing when running a Nested Query

I have a database with three tables:

  1. grocery
  2. nutrient
  3. grocery_nutrient (for many to many)

Actually, the database is very big and I am facing the problems by running this query, the SQL browser crashes when I run, if I add LIMIT it works.

enter image description here

enter image description here

enter image description here

and this is the query I have written for it.

Advertisement

Answer

You can simplify your query if you use conditional aggregation:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement