Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

select multiple columns count one column and group by one column in one table

select d.Employee, d.cnt, d.Post, d.c_name, d.Deli_Date, d.Note 
from (select d.*,
             count(*) over (partition by employee) as cnt,
             row_number() over (partition by employee order by deli_date desc) as seqnum
      from delivery d
     ) d
where seqnum = 1;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #multiple #columns #count #column #group #column #table
ADD COMMENT
Topic
Name
6+6 =