<s>[INST] Write a SQL code to count the number of shops for each unique POS reference ID.  [/INST] SELECT shop_pos_reference_id, COUNT(*) AS total_shops_per_pos_reference_id FROM order_transaction.transaction_detail_deprecated GROUP BY shop_pos_reference_id; </s>