Skip to content
Advertisement

Tag: heidisql

Calculating daily volumes from total volume

I have the following data: ID Date Total A 2021-09-03 0 A 2021-09-04 12 A 2021-09-05 37 A 2021-09-06 40 B 2021-08-03 20 B 2021-08-04 43 B 2021-08-05 75 And from this data, I would like to get the following table: ID Date Total Daily A 2021-09-03 0 0 A 2021-09-04 12 12 A 2021-09-05 37 25 A 2021-09-06 40

MySQL: Updating multiple columns using if else

I need help to set a mySQL update query for my little project like below: In my table, there is a column REFERENCE which contains varchar like where the character before the symbol ‘_’ determines certain values for other columns like stated above. I am still fairly new to mySQL, so appreciates any help! Answer You can use case expressions:

How to count two different columns in sql

I have a database which looks like this. My task is to get the columns of dates, number of exams on that date, number of students who write an exam on that date. Something like Date – Exam Count – Student Count. I have done this but in two different queries. Result: edate Exams | ==================| 2020-05-24 | 1 |

Advertisement