Skip to content
Advertisement

SQL: Selecting all tuples which contain a certain value in a column after using count

I have the following table called Stores:

I would like to output all the Names that are the only one in their Industry (e.g. XYZ and JKI are the only Names in their Industry).

I have the following query:

I get an output table which has an attribute called Number which gives the total number of times each Industry appears in the table Stores. How can I select all the tuples which have the value of 1 in the Number column after using the inner join?

Advertisement

Answer

use where condition

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement