SELECTs0_.idASid_0,s0_.nameASname_1,s0_.deleted_atASdeleted_at_2,s0_.is_activeASis_active_3,s0_.created_atAScreated_at_4,s0_.updated_atASupdated_at_5,s0_.store_idASstore_id_6FROMstore_table_locations0_WHERE (s0_.store_id=?) AND (s0_.deleted_atISNULL)
SELECTs0_.idASid_0,s0_.nameASname_1,s0_.deleted_atASdeleted_at_2,s0_.is_activeASis_active_3,s0_.created_atAScreated_at_4,s0_.updated_atASupdated_at_5,s0_.store_idASstore_id_6FROMstore_table_locations0_WHERE
(s0_.store_id=?)
AND (s0_.deleted_atISNULL)
SELECTs0_.idASid_0,s0_.nameASname_1,s0_.deleted_atASdeleted_at_2,s0_.is_activeASis_active_3,s0_.created_atAScreated_at_4,s0_.updated_atASupdated_at_5,s0_.store_idASstore_id_6FROMstore_table_locations0_WHERE (s0_.store_id=5) AND (s0_.deleted_atISNULL);
SELECTs0_.idASid_0,s0_.table_numberAStable_number_1,s0_.max_capacityASmax_capacity_2,s0_.deleted_atASdeleted_at_3,s0_.is_activeASis_active_4,s0_.created_atAScreated_at_5,s0_.updated_atASupdated_at_6,s0_.store_idASstore_id_7,s0_.table_location_idAStable_location_id_8,s0_.shapeASshape_9FROMstore_tables0_WHERE (s0_.store_id=?ANDs0_.is_active=?) AND (s0_.deleted_atISNULL)
SELECTs0_.idASid_0,s0_.table_numberAStable_number_1,s0_.max_capacityASmax_capacity_2,s0_.deleted_atASdeleted_at_3,s0_.is_activeASis_active_4,s0_.created_atAScreated_at_5,s0_.updated_atASupdated_at_6,s0_.store_idASstore_id_7,s0_.table_location_idAStable_location_id_8,s0_.shapeASshape_9FROMstore_tables0_WHERE
(
s0_.store_id=?ANDs0_.is_active=?
)
AND (s0_.deleted_atISNULL)
SELECTs0_.idASid_0,s0_.table_numberAStable_number_1,s0_.max_capacityASmax_capacity_2,s0_.deleted_atASdeleted_at_3,s0_.is_activeASis_active_4,s0_.created_atAScreated_at_5,s0_.updated_atASupdated_at_6,s0_.store_idASstore_id_7,s0_.table_location_idAStable_location_id_8,s0_.shapeASshape_9FROMstore_tables0_WHERE (s0_.store_id=5ANDs0_.is_active=1) AND (s0_.deleted_atISNULL);
SELECTs0_.idASid_0,s0_.nameASname_1,s0_.image_file_nameASimage_file_name_2,s0_.deleted_atASdeleted_at_3,s0_.is_activeASis_active_4,s0_.created_atAScreated_at_5,s0_.updated_atASupdated_at_6,s0_.store_idASstore_id_7,s0_.income_department_idASincome_department_id_8,s0_.station_idASstation_id_9FROMstore_product_groups0_WHERE (s0_.store_id=?) AND (s0_.deleted_atISNULL)
SELECTs0_.idASid_0,s0_.nameASname_1,s0_.image_file_nameASimage_file_name_2,s0_.deleted_atASdeleted_at_3,s0_.is_activeASis_active_4,s0_.created_atAScreated_at_5,s0_.updated_atASupdated_at_6,s0_.store_idASstore_id_7,s0_.income_department_idASincome_department_id_8,s0_.station_idASstation_id_9FROMstore_product_groups0_WHERE
(s0_.store_id=?)
AND (s0_.deleted_atISNULL)
SELECTs0_.idASid_0,s0_.nameASname_1,s0_.image_file_nameASimage_file_name_2,s0_.deleted_atASdeleted_at_3,s0_.is_activeASis_active_4,s0_.created_atAScreated_at_5,s0_.updated_atASupdated_at_6,s0_.store_idASstore_id_7,s0_.income_department_idASincome_department_id_8,s0_.station_idASstation_id_9FROMstore_product_groups0_WHERE (s0_.store_id=5) AND (s0_.deleted_atISNULL);
SELECTs0_.idASid_0,s0_.nameASname_1,s0_.priceASprice_2,s0_.sale_priceASsale_price_3,s0_.in_menuASin_menu_4,s0_.deleted_atASdeleted_at_5,s0_.is_activeASis_active_6,s0_.created_atAScreated_at_7,s0_.updated_atASupdated_at_8,count(s0_.id) ASsclr_9,s0_.product_group_idASproduct_group_id_10,s0_.store_idASstore_id_11,s0_.currencyAScurrency_12FROMstore_products0_WHERE (s0_.store_id=?ANDs0_.product_group_id=?) AND (s0_.deleted_atISNULL)
SELECTs0_.idASid_0,s0_.nameASname_1,s0_.priceASprice_2,s0_.sale_priceASsale_price_3,s0_.in_menuASin_menu_4,s0_.deleted_atASdeleted_at_5,s0_.is_activeASis_active_6,s0_.created_atAScreated_at_7,s0_.updated_atASupdated_at_8,count(s0_.id) ASsclr_9,s0_.product_group_idASproduct_group_id_10,s0_.store_idASstore_id_11,s0_.currencyAScurrency_12FROMstore_products0_WHERE
(
s0_.store_id=?ANDs0_.product_group_id=?
)
AND (s0_.deleted_atISNULL)
SELECTs0_.idASid_0,s0_.nameASname_1,s0_.priceASprice_2,s0_.sale_priceASsale_price_3,s0_.in_menuASin_menu_4,s0_.deleted_atASdeleted_at_5,s0_.is_activeASis_active_6,s0_.created_atAScreated_at_7,s0_.updated_atASupdated_at_8,count(s0_.id) ASsclr_9,s0_.product_group_idASproduct_group_id_10,s0_.store_idASstore_id_11,s0_.currencyAScurrency_12FROMstore_products0_WHERE (s0_.store_id=5ANDs0_.product_group_id=1) AND (s0_.deleted_atISNULL);
SELECTDISTINCTs0_.table_idASsclr_0FROMstore_bill_tables0_INNER JOINstore_bills1_ONs0_.bill_id=s1_.idAND (s1_.deleted_atISNULL) WHERE (s1_.store_id=?ANDs1_.is_closed=?) AND (s0_.deleted_atISNULL)
SELECTDISTINCTs0_.table_idASsclr_0FROMstore_bill_tables0_INNER JOINstore_bills1_ONs0_.bill_id=s1_.idAND (s1_.deleted_atISNULL)
WHERE
(
s1_.store_id=?ANDs1_.is_closed=?
)
AND (s0_.deleted_atISNULL)
SELECTDISTINCTs0_.table_idASsclr_0FROMstore_bill_tables0_INNER JOINstore_bills1_ONs0_.bill_id=s1_.idAND (s1_.deleted_atISNULL) WHERE (s1_.store_id=5ANDs1_.is_closed=0) AND (s0_.deleted_atISNULL);