Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ How many unique? | Selecting
SQL Basics
セクション 1.  7
single

single

bookHow many unique?

メニューを表示するにはスワイプしてください

But what if we want to calculate the number of unique site visitors? Sounds like a combination of selecting unique and then counting...

Yes, that's the point! To calculate the number of unique observations over a certain column use COUNT(DISTINCT( ... )) statement. For example,

12
SELECT COUNT(DISTINCT(user_id)) FROM visitors
copy

This query will return a single value - the number of unique user_id in the visitors table.

タスク

スワイプしてコーディングを開始

Count the number of different cars models in the audi_cars table.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  7
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt