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
Tag: mysql-workbench
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
Select query on MYSQL table taking long time and getting timed out
I have a mysql table with 2 million rows, when I’m running any select query on the table it’s taking long time to execute and ultimately it does not return any result. I have tried running select query from both Mysql Workbench and terminal, it’s the same issue happening. Below is the table: And below is the select query i’m
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: How to sum on joined queries (subqueries) with multiple conditions?
I have two tables: Table Y: indicates over what time period money is valid +———–+———+——+ | starttime | endtime | name | +———–+———+——+ | 1 | 2 | Mark | | …
Compare two MYSQL tables and return missing dates and group by column
I have two tables. I want to compare table A with B and get the missing date from with name of the user. TABLE A TABLE B EXPECTED OUTPUT Also, Along with it can I get the count of the missing dates for each user if possible? Answer You must cross join Table B to the distinct names of Table
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
How to insert into a row, a value from other table?
I have 3 Mysql tables. A table with the classes and the labs and their id. A table with the teachers_list and their subject. A table which is going to be the schedule.** I want to randomly assign one of the physicists to one of the physics labs on my third table which is going to be the schedule. **This