Skip to content

Tag: mysql

From sqlite syntax to mysql syntax

I’m having some troubles moving from sqlite syntax to mysql syntax. Does anybody know a ressource showing the basic syntax in sqlite and its equivalent in mysql ? In my particular case, I want to transform this sqlite code into mysql one: For the moment, I did that: DROP TABLE IF EXISTS post; But I got …

SQL Insert JSON into table column

while searching for a way to insert array into single db columns, I found an article about inserting JSON string. However it wasn’t explained how. I tried to search and find the way with no success. I have the following table: What i want to do is insert a Json arry in the address column. like: I though…

subquery shows more that one row group by

I am trying to get the data for the best 5 customers in a railway reservation system. To get that, I tried getting the max value by summing up their fare every time they make a reservation. Here is the code. this throws the error:[21000][1242] Subquery returns more than 1 row If I remove the group by from the…

Compare previous row’s date in grouped 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 calculate hours that the air temperature below 7.22. I want to do this calculation on the S…

Possible for a MySQL trigger to silently fail?

I’m pulling my hair out trying to debug something. We have large raw tables where ecommerce data gets added to at high. We have summary tables that are populated via insert, update, and delete triggers which are used when users query from our UI. So, those two tables should “match” which is …