Is this even possible?
| Name | Country |
|---|---|
| Rupee | India |
| Dollar | USA |
| Yen | Japan |
| Dollar | Canada |
| Dollar | Australia |
As you can see, I have a simple table in which name column can have duplicate records.
I want to get all records from the table, but when there are duplicate records, just get country = Canada.
So, result will be,
| Name | Country |
|---|---|
| Rupee | India |
| Yen | Japan |
| Dollar | Canada |
This is question is different from this question: Retrieving the last record in each group - MySQL
In my question, I will receive country name from outside world. Based on country, I need to filter duplicate data.