Nick Linnik
10/18/2023, 8:02 PMWITH elementary_test_results AS (
SELECT
*,
ROW_NUMBER() OVER (
PARTITION BY test_unique_id ORDER BY detected_at DESC
) AS row_num
FROM
{{ ref('elementary_test_results') }}
)
SELECT *
FROM elementary_test_results
WHERE row_num = 1
ORDER BY detected_at DESC
But the numbers don't match. The report has 2557 records, while my query returns 1185 records. What am I doing wrong? Maybe I missed some crucial part of the documentation where it is described?
Thanks in advance!Maayan Salom
10/30/2023, 8:52 PMNick Linnik
11/28/2023, 1:22 PMdbt_tests and as one per column per type in UI report. I am not sure how to get same granularity out of my DB.