I have the following query:
SELECT carreras.nombre,grupos_acta.grado,count(grupos_acta.grado) AS grupos ,sum(hombres),sum(mujeres),descripcion
FROM control.asignacion_grupos
INNER JOIN control.grupos_acta ON grupos_acta.id = id_grupos_acta
INNER JOIN control.carreras ON carreras.id = id_carreras
INNER JOIN control.estadistica ON estadistica.id_asignacion_grupos = asignacion_grupos.id
INNER JOIN control.modalidad ON modalidad.id = id_modalidad
WHERE id_ciclos = 4 AND grupos_acta.id_campus = 1 AND carreras.tipo=1
GROUP BY descripcion,carreras.nombre,grupos_acta.grado
ORDER BY nombre ASC
which gives me the result:
The query gives me the data I ask, the detail I have is that I need to alphabetically order two columns which are name and description ,
and tried to do ORDER BY nombre,descripcion ASC
, but I can not get results, I would like to know what would be the correct way to sort two columns alphabetically, ie, that Bachelor of Business Administration and your description I started in school, I hope to make myself understood, thank you.
UPDATE In the same way and the other type, but it does not give me the results I want.