I’m following a video from Google Data Analytics for a query on Bigquery. For some reason, even though I copied exactly what the person in the video wrote, I keep getting an error with the opening of CONCAT. It keeps saying ‘expected end of input but got “(“‘ and underlines ‘(Warehouse.state,’. Can anyone help, I’m not sure what it wants me to do.
I bolded the part that is giving me trouble and added a picture of what the instructor wrote here.
SELECT Warehouse.warehouse_id
CONCAT**(Warehouse.state,** ': ', Warehouse.warehouse_alias) AS warehouse_name,
COUNT(Orders.orders_id) AS number_of_orders,
(SELECT
COUNT(*)
FROM warehouse_orders.orders Orders) AS total_orders,
CASE
WHEN COUNT(Orders.order_id)/(SELECT COUNT(*) FROM warehouse_orders.orders Orders) <= .20 THEN "Fufilled 0-20% of Orders"
WHEN COUNT(Orders.order_id)/(SELECT COUNT(*) FROM warehouse_orders.orders Orders) > .20 AND
COUNT(Orders.order_id)/(SELECT COUNT(*) FROM warehouse_orders.orders Orders) <= .60 THEN "Fufilled 20-60% of Orders"
ELSE "Fufilled more than 60% of Orders"
END AS fufillment_summary
FROM warehouse_orders.warehouse Warehouse
LEFT JOIN warehouse_orders.orders Orders
ON Orders.warehouse_id = Warehouse.warehouse_id
GROUP BY Warehouse.warehouse_id, warehouse_name
HAVING COUNT(Orders.order_id) > 0