I have some problems with writing a SQL query for MySQL. I have a table with the following structure:
mysql> select id, pass, val from data_r1 limit 10;
+------------+--------------+----------------+
| id | pass | val |
+------------+--------------+----------------+
| DA02959106 | 5.0000000000 | 44.4007000000 |
| 08A5969201 | 1.0000000000 | 182.4100000000 |
| 08…
I have the following SQL:(bitemp)
SELECT COUNT (*) AS Count
FROM Table T
WHERE (T.Update_time =
(SELECT MAX (B.Update_time )
FROM Table B
WHERE (B.Id = T.Id))
GROUP BY T.Grouping
now I am getting a resultset …
I would like to know if I can get the average of a sum in one single SQL SERVER request,
Have tried to do it with the following request but it doesn't work:
SELECT t.client,
AVG(SUM(t.asset)) …