Skip to content

Tag: mysql

Why am I getting a duplicated column when doing this SQL query?

I am trying to do a set of queries in mySQL. In my final query I am trying to select the course_id column, but there are two columns with the title course_id and the exact same values, so I am encountering an error saying Query Error: Error: ER_NON_UNIQ_ERROR: Column ‘course_id’ in field list is a…

Mysql SQL syntax group by [asc|desc]?

In using mysql8.0 it gives the GROUP BY syntax as the following: [GROUP BY {col_name | expr | position} [ASC | DESC], … [WITH ROLLUP]] What is the usage of the asc or desc in the group by? Every …