Unique values from column
In real life, you may work with big tables containing thousands of rows and lots of columns. For example, you may have a database with all the users who have visited your site, and you want to know all the countries that attended your site.
In SQL, to extract unique values from the column use the DISTINCT
statement. For example, to extract unique countries from the table visitors
use:
12SELECT DISTINCT(country) FROM visitors
Swipe to start coding
From the audi_cars
table extract all the unique models of cars.
Løsning
Takk for tilbakemeldingene dine!
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 2.63Awesome!
Completion rate improved to 2.63
Unique values from column
In real life, you may work with big tables containing thousands of rows and lots of columns. For example, you may have a database with all the users who have visited your site, and you want to know all the countries that attended your site.
In SQL, to extract unique values from the column use the DISTINCT
statement. For example, to extract unique countries from the table visitors
use:
12SELECT DISTINCT(country) FROM visitors
Swipe to start coding
From the audi_cars
table extract all the unique models of cars.
Løsning
Takk for tilbakemeldingene dine!
single
Awesome!
Completion rate improved to 2.63
Unique values from column
Sveip for å vise menyen
In real life, you may work with big tables containing thousands of rows and lots of columns. For example, you may have a database with all the users who have visited your site, and you want to know all the countries that attended your site.
In SQL, to extract unique values from the column use the DISTINCT
statement. For example, to extract unique countries from the table visitors
use:
12SELECT DISTINCT(country) FROM visitors
Swipe to start coding
From the audi_cars
table extract all the unique models of cars.
Løsning
Takk for tilbakemeldingene dine!