Created
October 11, 2019 10:33
-
-
Save eberloso/83ef60b74b59897a5564885641bc3c74 to your computer and use it in GitHub Desktop.
Detectar casos ATR amb passos amb header que no estan al step_ids
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 | |
| sw.id, | |
| count(header.id) as headers, | |
| (select count(*) from giscedata_switching_step_info where sw_id = sw.id group by sw_id) as steps | |
| from giscedata_switching_step_header header | |
| JOIN giscedata_switching sw ON sw.id=header.sw_id | |
| group by sw.id | |
| having | |
| count(header.id) != (select count(*) from giscedata_switching_step_info where sw_id = sw.id group by sw_id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment