Stumped on a query
i hoping can me. it has been long since have had other simple queries in sql struggling solve problem.
let’s have table 1 column named fileextensions, , values in column follows:
.docx
.pptx
.docx
.pptx
.docx
.pptx
.docx
.docx
.pptx
i need write query give me following summary results showing how many of each file extension present in column:
fileext count
.pdf 6
.docx 5
.pptx 4
the example above simplification of need because can't use hard coded values for extensions in statement because not known in advance.
any ideas?
select fileext, count)fileext) ct
from tablename
group fileext
please aware ssrs forum rather sql queries forum
rgds geoff
SQL Server > Transact-SQL
Comments
Post a Comment