Created
November 8, 2017 19:47
-
-
Save pigreco/b8e87cfd0dba5525d2fdb514d2fc71fa to your computer and use it in GitHub Desktop.
numeri sequenziali per gruppi di valori
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 cod, (SELECT count(*) FROM mia_tabella b WHERE a.cod = b.cod AND a.ROWID >= b.ROWID) AS cod_seq2 | |
FROM mia_tabella a | |
-- mia_tabella esempio -- thread https://goo.gl/3NjJtX | |
-- cod,cod_seq | |
-- 029.151,1 | |
-- 122.756,1 | |
-- 122.756,2 | |
-- 122.756,3 | |
-- 122.756,4 | |
-- 704.001,1 | |
-- 704.001,2 | |
-- 599.864,1 | |
-- 354.365,1 | |
-- 354.365,2 | |
-- 009.975,1 | |
-- 747.301,1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment