Pho3nix
The Legend
Hi guys,
Haven't played with SQL in a minute and stuck on some logic.
[table="width: 500"]
[tr]
[td]Id[/td]
[td]Name[/td]
[td]Type[/td]
[/tr]
[tr]
[td]1[/td]
[td]Bob[/td]
[td]Positive[/td]
[/tr]
[tr]
[td]2[/td]
[td]Bob[/td]
[td]Positive[/td]
[/tr]
[tr]
[td]3[/td]
[td]Bob[/td]
[td]Negative[/td]
[/tr]
[/table]
I have the above table and I'm looking to set the type to Positive. How would I do this?
output :
Code is actually a little more complex and trying to explain as best I can 
EDIT : The output above with the three bobs is a result set from another query. I need to count the positives and negatives from that result set and only return the one that comes up the most.
Haven't played with SQL in a minute and stuck on some logic.
[table="width: 500"]
[tr]
[td]Id[/td]
[td]Name[/td]
[td]Type[/td]
[/tr]
[tr]
[td]1[/td]
[td]Bob[/td]
[td]Positive[/td]
[/tr]
[tr]
[td]2[/td]
[td]Bob[/td]
[td]Positive[/td]
[/tr]
[tr]
[td]3[/td]
[td]Bob[/td]
[td]Negative[/td]
[/tr]
[/table]
I have the above table and I'm looking to set the type to Positive. How would I do this?
output :
| Bob | Positive |
EDIT : The output above with the three bobs is a result set from another query. I need to count the positives and negatives from that result set and only return the one that comes up the most.
Last edited: