Duplicate Records

Duplicate Records

  
Hello

How can i avoid the duplicate recording on my Aggregate as you w'll see at this attachement please can you bring me a solution,and i'm sorry if i posted for severls issus because really i want to accomplish this project imediatly but i also have problems with my application
Thanks
I'm so Sorry i forgot to attach the png
If you used the Group By you only get the rows in your result you see on the left side (blue). So in the result you wont have duplicates...
Hi Ilham Rania, 

As Brian Hollander wrote, you have to group by the colums you want. Just look at your table and see which columns you need to group by, so the duplicates values would "merge".

Cheers
Hi

yes i aleready used the Group by but i also have the duplicate records

Thanks
If you still have duplicate values, then you need  to group by another column. 
Down it's just an example to retrive values without dupplication by Group By
Ie: Imagine Persons Names and Districts and you want to retrieve only one line with a specific district and for a person name and count how many "Rania" are in the District A" It could happen that in the same district there is many persons with teh same first name, then you would make:

Select Distinct Person_Name, District
From Some_table
Where District = 'District A' and Person_name = 'Rania'
Group By District, Person_Name

Hope it helps