Saturday, 3 March 2018

Microsoft SQL Derived Table

Microsoft SQL Derived Table
-- Derived tables are inner subqueries within the from statement of the outer query

select product, productCounter
from
(
 select [Product], count(*) as ProductCounter
 from [test].[dbo].[options on fx majorsii]
 group by Product
 ) as ProductDerivedTable
 where ProductCounter>2


No comments:

Post a Comment