MulaiMulai sekarang secara gratis

Identifying duplication

Duplication can happen for a number of reasons, often in unexpected ways. Because of this, it's important to get in the habit of validating your queries to ensure no duplication exists. To validate a query, take the following steps:

  1. Check the total value of a metric from the original table.
  2. Compare that with the total value of the same metric in your final report.

If the number from step 2 is larger than step 1, then duplication is likely the culprit. In this exercise, you will go through these steps to identify if duplication exists.

Latihan ini adalah bagian dari kursus

Reporting in SQL

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

-- Pull total gold_medals for winter sports
SELECT ____
FROM ____;
Edit dan Jalankan Kode