Reputation
1,137
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
8 19
Impact
~28k people reached

Apr
28
comment MySQL Return average for every unique id per day
You have to group by the deviceId, too. Try GROUP BY NodeDate, NodeID.
Apr
28
comment MySQL Return average for every unique id per day
This is actually quite basic. Read about the GROUP BY clause and if you encounter any problems, please post what you've tried.
Apr
26
awarded  Notable Question
Apr
20
comment Storing Friendships: Should I use a multivalued column to retain Friend Identifiers?
I recommend you read this: stackoverflow.com/questions/3653462/…
Apr
18
revised How can I assign values (-1, 0, 1) to the difference between consecutive rows in a MySQL table having 20 columns and 20 rows
code formatting and tagging properly
Apr
18
suggested approved edit on How can I assign values (-1, 0, 1) to the difference between consecutive rows in a MySQL table having 20 columns and 20 rows
Apr
18
answered How can I assign values (-1, 0, 1) to the difference between consecutive rows in a MySQL table having 20 columns and 20 rows
Apr
3
awarded  Yearling
Mar
30
answered how to “revoke” a “GRANT OPTION” from an mysql user/database?
Mar
30
comment Mysql locking - How to acquire a lock in the DB for each userId
I guess this is what you're looking for: dev.mysql.com/doc/refman/5.7/en/innodb-locking-reads.html
Mar
30
comment Stored procedure unable to compare
Not sure, what you mean. You can specify for example ON DELETE CASCADE ON UPDATE CASCADE with a foreign key, which means that when you delete a parent record, the child record(s) get deleted as well. Same for update in this example. When you don't specify that when creating the foreign key, the only effect a foreign key has on data is, that you can't insert a child record, when there's no parent record.
Mar
30
comment Stored procedure unable to compare
So there's no problem anymore? Feel free to accept my answer :)
Mar
30
comment Stored procedure unable to compare
How do you know, this is not correct behaviour? Have you checked your data?
Mar
30
comment Stored procedure unable to compare
What did you do exactly? With a simple "it did not work" I can not help you.
Mar
30
answered Stored procedure unable to compare
Mar
21
comment Incorrect backup size
Please reread the question and think about how much information you've given us. Basically nothing more than "every 7th day the backup size is larger although it should be around the same for every day. Oh, and we're using a script for this.". So, do you think we can help you with this? No. Maybe it would be a good idea to post the backup script. Maybe you can find errors that occured on 6 of 7 days or only on 7th day...
Mar
20
comment How can I randomize primary key values?
Well, still you didn't even have a try it seems. You could start here: dev.mysql.com/doc/refman/5.7/en/create-procedure.html There are plenty of examples.
Mar
19
comment How can I randomize primary key values?
So you got the code already but are just too lazy to look up the equivalent syntax for MySQL? And you suppose we're going to do the work for you because we have nothing better to do?
Feb
11
comment Identify MySQL Connection timeout
Erm, your nc parameter -w 2 is the cause. That's the timeout for idle connections for nc. MySQL has nothing to do with this. Also you have your answer when you do in MySQL show global variables like '%timeout%';
Feb
3
comment How to fix MySQL anonymous account security issue?
Remove the user?