Skip to content

Tag: mysql-workbench

avg value from a sql table

I have a MySQL table called track_e_exercises where is stored attempts in a test, every row is a new attempt. I want to know how to obtain the avg attempts in the course per person. How can I make that? c_id is the course id column and exe_user_id is the user id column. expected result for c_id=7 => (# of

LIKE statement SQL

Dont work brackets in LIKE statement I use MySQL WorkBench, I dont understand why SELECT * from user where name like’B[io]’ dont work. My DataBase: Answer Because MySQL does not support character classes in like expressions. Neither does the SQL standard. Use regular expressions: Incidentally, the…

Feature from workbench maybe?

I’m trying to create a table in workbench, and I don’t know why theses names can be set up. It ask me to change it. Maybe it concern features that I would like to disable. release , user appear in blue like a special command. Answer A column name is an identifier, and those can’t include unl…

I need to optimize this MYSQL query

I have tried NOT EXIST but didn’t get expected result can’t do index since duplicate entries of student_id,status are valid entries,Need to reduce execution time since the table has large number of data. Answer You can try query with JOIN condition: Here the fiddle SQLize.online Sure that your tab…