If you want to count something inside a group (something the same as auto_increment from mysql), you can use row_number
ROW_NUMBER ()
OVER (PARTITION BY ur_prnt_uid_id ORDER BY ur_chld_uid_id)
Case Study
-
This note isn’t a “real” case study, i.e. it’s not going to show you
details of the data, indexes, plans etc. from a production system, but it
is modelling...
Acum 4 zile
Niciun comentariu:
Trimiteți un comentariu