I need to create a query prepared now I use
select restante,cajas,calidad, count(*) as total from separacion_detalles group by calidad
I do not know much about sql, in the calidad
column I need to make inner join
to the quality table so that it shows me the name not the id.
This is how my table is currently:
an idea of how it should look:
---------- ---------- ---------- ----------
restante cajas calidad total
-------------------------------------------
40 40 CAL1 3
40 40 CAL2 3
20 20 CAL3 1
The idea is simply to combine the qualities that are repeated in a single row.