I’m using an old version of MySQL. I cannot upgrade it due to some strong reasons. I’ve a table PatientAppointment with only 2 columns. Here is the table: I want 5 things: Create a new column in runtime monthOfCheckup from dateOfCheckup Convert duration into integer field as minutes Accumulating total for each month (not date) I was able to achieve
Tag: mysql-5.7
Match duplicate value from the second column based on duplicate value from first colum
I have table like this I have two condition for this table which is : Val column must be duplicate value AND, Val2 column must be duplicate so my goal is return data if the two condition meet. If the column val had duplicate value and column val2 had duplicate value and each column on his own row. my query
How can i count project status by change/update made
I want to count status change by id from to I have a mysql status table which has a name with pre implementation, implementation and operations states. a project contains project id, name, start date fields. both status and projects have a many to many relationship called project_status table contains project_id, status_id, date_of_progress. so i want to count all projects
a query from SQL/92 doesn’t work in later versions
I have a sql query like this: select tt.product_name, tt.countt from (select ofr.product_name as product_name, count(*) as countt from offers ofr group by ofr.product_name) as tt where 12 = (select …
“group by desc” syntax error on mysql 8.0 which is fine on 5.7
The statement is like SELECT * FROM db.table group by id desc; Would raise an error like 15:02:24 SELECT * FROM db.table group by id desc LIMIT 0, 10 Error Code: 1064. You have an error in …
Why use GTIDs in MySQL replication?
When it comes to database replication, what is the use of global transaction identifiers? Why do we need it to prevent concurrency across the servers? How is that prevention achieved exactly? I tried to read the documentation at http://dev.mysql.com/doc/refman/5.7/en/replication-gtids.html but still could not understand it clearly. This may sound very basic but I would really appreciate it if someone could