This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select case when u.marketing_source_id = 8382 then 'Яндекс Директ - курсы_main' | |
when u.marketing_source_id = 8381 then 'Google Adwords - курсы_main' | |
end Маркетинговый_Источник, | |
count(u.id) as Платящие_пользователи, | |
CASE | |
WHEN ((u.marketing_source_id IN (8381, 8382)) | |
AND (c.marketing_source_id NOT IN ( | |
SELECT ms.id AS id_ms | |
FROM marketing_sources ms | |
WHERE (ms.Source_Group_ID >= 1 AND ms.Source_Group_ID <= 53) |