SQL noob here. I want to sum two columns separately, using 2 separate where conditions.
ID NAME VALUE1 VALUE2
--- ------- ------- -------
1 Orange 5 30
2 Orange 11 30
3 Orange 7 15
4 Pear 12 12
5 Pear 13 25
6 Pear 4 25
- Sum of VALUE1 column where values are > 10
- Sum of VALUE2 column where values are > 20
- Grouped by NAME
Desired output:
NAME VALUE1 VALUE2
------- ------- -------
Orange 11 60
Pear 25 50
Thanks!