Hi
Iam new for Sql I want fetch the data from DB below format using while loop .pls help me
This is my DB data look like :
| counterno | value | date |
| 1 | 200 | 6-Oct-14 |
| 1 | 300 | 6-Oct-14 |
| 2 | 100 | 6-Oct-14 |
| 2 | 800 | 6-Oct-14 |
| 3 | 900 | 6-Oct-14 |
| 4 | 100000 | 6-Oct-14 |
| 5 | 2000 | 6-Oct-14 |
| 5 | 3000 | 6-Oct-14 |
| 7 | 200 | 6-Oct-14 |
| 7 | 100 | 6-Oct-14 |
I want out put like this.
| counterno | value | date |
| 1 | 500 | 6-Oct-14 |
| 2 | 900 | 6-Oct-14 |
| 3 | 900 | 6-Oct-14 |
| 4 | 100000 | 6-Oct-14 |
| 5 | 5000 | 6-Oct-14 |
| 7 | 300 | 6-Oct-14 |

Ramesh MaruthiRank #937 · 2.2K reputationPosted Oct 6, 2014, 10:32 AM EDT
group by counterno
Pradeep ShetRank #595 · 4K reputationPosted Oct 6, 2014, 10:36 AM EDT
Munesh SharmaRank #174 · 13.9K reputationPosted Oct 6, 2014, 11:16 PM EDT
Janardhan Reddy3 reputationPosted Oct 7, 2014, 9:16 AM EDT