Skip to content
Advertisement

Tag: mysql-5.7

Determine growth in value in a specific time range

Given the following data set example, how should I structure my SQL query in order to determine if the value has grown over time (given a time range in the query) for a specific UserId by returning either a positive/negative growth percentage result or a true/false result UserId timestamp value 1 1617711825 350 1 1617711829 400 1 1617711830 450 5

Compare rows in one table with MySQL

I tried to compare rows in one table that I have. The table is like this: table I have 3 rows for comparing, and they had tp 1,2,3 for each one with the same fid and different id. The question is, how can I compare three of them to return? For example, more explanation For example, if ct of the

Advertisement