Created
March 5, 2022 18:49
-
-
Save MikeRzhevsky/379a339f4b61e406080ee2f884f1f29b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 indi.customer_id | |
| from clickhouse.cifra.ct_privilege_cards__calculated_indicators as indi | |
| WHERE NOT EXISTS | |
| (SELECT dbt_statuses."покупатель" | |
| from cifratest.dbt_stage."dm_stage_регистрсведений_статусыкартprivilege" as dbt_statuses | |
| where indi.customer_id = dbt_statuses."покупатель" | |
| and indi.redeem_percentage = dbt_statuses."процентвыкупа" | |
| and indi.redeem_amount = dbt_statuses."суммавыкупа" | |
| and indi.cancelled_orders_amount = dbt_statuses."суммаотказов" | |
| and indi.ordered_basic_goods_qty = dbt_statuses."заказаноcущественныхтоваров" | |
| ) | |
| limit 100 | |
| -- SQL Server did not return a response. The connection has been closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment