Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle sql assign unique number to each grouping

SELECT  t.*, DENSE_RANK() OVER (ORDER BY department desc, country desc) AS grp
FROM    mytable t
Comment

PREVIOUS NEXT
Code Example
Sql :: yii2 mysql ping 
Sql :: tsql find foreign key references 
Sql :: oracle current date 
Sql :: oracle synonym 
Sql :: mysql show table column full description 
Sql :: oracle aleter trigger ora-01031 
Sql :: postgres count distinct 
Sql :: oracle kill job by sid 
Sql :: wordpress change user password sql 
Sql :: set permanent SET GLOBAL sql_mode ubuntu 
Sql :: oracle list index on table 
Sql :: mysql full outer join java 
Sql :: delete all rows from table mysql 
Sql :: my sql version 
Sql :: select * from table where name like 
Sql :: oracle pl/sql prevent sql injection 
Sql :: mysql return if it contains 
Sql :: oracle limit user tablespace 
Sql :: mysql delete all where id is not equal 
Sql :: sql select except null 
Sql :: oracle replace 0 values 
Sql :: mysql update inner 
Sql :: ilike for date postgres 
Sql :: oracle add column with default value 
Sql :: mssql last day of month 
Sql :: psql client write to bash variable 
Sql :: how to find column in all the tables sql 
Sql :: this week mysql 
Sql :: insert if not exists postgresql 
Sql :: calculate age in sql 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =