I'd like to add one extra column with same text "Toys" to query result.
in the Cell G2, I want the query to be like this:
" select *, 'Toys' label 'Toys' 'Product Type' "
This is the expected result I want to display:
CodePudding user response:
You'll need to list all the columns explicitly for that. SELECT *, 'toys'
construction does not work in Google Sheets QUERY()
.
=QUERY(A1:B8,"SELECT A, B, 'Toys' label 'Toys' 'Product Type'")
CodePudding user response:
Try this
=QUERY(A1:C11,"label A 'Items', B 'Price', C 'Product Type' ")
(Adjust the formula according to your ranges and locale)