Skip to content
Advertisement

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

What is the issue in below sql query? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I am beginner in sql. Anyone please tell me the problem of my customised query. Error Code: 1241. Operand should contain 1 column(s) Subscription table

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 like does work. You just have no data that starts with the five characters

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 unless it’s a delimited

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 tables have index on student_id field. Since you filter by status field,

mySQL question on how to add more info to a column

Got this table containing info about customers, dates and their purchases values. Let’s say some of them bought something in November but nothing in December. Now, I am trying to have all the customers + all they spent and to use IFNULL() to the ones that have not bought anything in Dec. I am filtering it for Dec and all

Advertisement