I have a table with multiple columns.’Product Name’ being one. Table has records for multiple products. product name is also used in a free text field. I need reports on how many rows have a particular product listed in ‘Product Name’or in ‘Free text’ fields.
Table as below :
Product Name | Issue description |
Microsoft | outlook not working
Lenovo | laptop blue screen
Samsung | microsoft word issu
I need the results as below :
Product | number of records
Microsoft | 2 ( one for outlook issue and other for word issue on a different product)
I need the product ( could be an alias), but need ‘Microsoft’ in the results
Is this achievable ?
I tried sub queries using ‘WITH’ and AS. Doesn’t work.
I’m using a reporting tool with freehand sql. Could not achieve with sub-queries. Appreciate any guidance.
Puneetha Sanjeeva Reddy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.