I have the following query: SELECT TIMESTAMPDIFF(HOUR, timestam, NOW()) AS HoursDifference
This return hour difference for example, 0, 1, 2, 3.
I need help writing a SQL Query that will take this HOUR and subtract it from 48 giving an answer of 48, 47, 46, or 45.
Let’s say it gives this output:
HoursDifference
0
1
2
8
How can I get the following output?:
HoursDifference
48
47
46
40
Thanks,
Are you asking like this