WITHtestas (select le ke's blog asname, le ke's blog, 15UNIONALLselect le ke's blog, 20UNIONALLselect Microsoft certification, 30UNIONALLselect Microsoft certification, 40UNIONALLselect Microsoft certification, 40) selec
WITH test as (select 'Happy col' as name, 10 as score union all select 'Happy col' blog ', 15 union all select 'Happy col ', 20 union all select 'Microsoft Authentication', 30 union all select 'Microsoft Authentication', 40 union all select 'Microsoft Authentication', 40) selec
WITH test
As
(
Select 'Happy col' as name, 10 as score
UNION ALL
Select 'Happy col', 15
UNION ALL
Select 'Happy col', 20
UNION ALL
Select 'Microsoft Authentication', 30
UNION ALL
Select 'Microsoft Authentication', 40
UNION ALL
Select 'Microsoft Authentication', 40
)
Select name, score
, FIRST_VALUE (score) over (order by name) as fst
, LAST_VALUE (score) over (order by name) as Lst
From test
,