Could you please help me to construct a query to sum specific rows from a table, basically desired output is:
+-----------------+----------------+
| Total reads | Total writes |
+-----------------+----------------+
| 345436 | 345435 |
+-----------------+----------------+
- Total reads = Com_select
- Total writes = Com_delete, Com_insert, Com_update, Com_replace
Best Answer
Use the typical trick of
sum(IF
the column is the right one, use it, if not read 0: