Good Night, I'm having a doubt I have a system that runs the following query:
SELECT IDUsuario ,COUNT('TotalDeUps') as Total, FROM uploads
WHERE Time >= '2018-02-20 00:00:00'
AND Time < '2018-03-21 00:00:00'
GROUP BY IDUsuario
ORDER BY COUNT("UserID") DESC
I have this table uploads a column called Size, I would like to know if I can add the size values of an ID to return, I thought of something like that just did not work:
SELECT IDUsuario ,COUNT('TotalDeUps') as Total,SUM(Size) as TotalDeUp FROM uploads
WHERE Time >= '2018-02-20 00:00:00'
AND Time < '2018-03-21 00:00:00'
GROUP BY IDUsuario
ORDER BY COUNT("UserID") DESC
The result was zero for all columns.