My database structure: (table name is company_info)
|comp_id | comp_name | comp_nature
| 001 | Citigroup, Inc. | Bank
| 002 | Harvard University | Academe
| 003 | Western Union | Courier
| 004 | C.I.A. | Government Agency
I wanted to create a query that would count comp_nature. But if comp_nature IS NOT "Bank" or "Academe", I wanted it to be categorized as "Other", so the result of the query should look something like this..
| comp_nature | count |
| Bank | 1 |
| Academe | 1 |
| Other | 2 |
I was able to use the COUNT keyword, but I couldn't seem to get how to create a "row" (Other) in a SELECT statement. (Or is this even possible in just one SELECT statement?).