Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT `order2`.`id` AS `order2_id`, `order2`.`externalId` AS `order2_externalId`, `order2`.`orderNumber` AS `order2_orderNumber`, `order2`.`itemCount` AS `order2_itemCount`, `order2`.`createdDate` AS `order2_createdDate`, `order2`.`expectedDate` AS `order2_expectedDate`, `order2`.`scheduledDate` AS `order2_scheduledDate`, `order2`.`shippingName` AS `order2_shippingName`, `order2`.`shippingPhone` AS `order2_shippingPhone`, `order2`.`billingName` AS `order2_billingName`, `order2`.`billingPhone` AS `order2_billingPhone`, `order2`.`radius` AS `order2_radius`, `order2`.`phone` AS `order2_phone`, `order2`.`email` AS `order2_email`, `order2`.`orderStatus` AS `order2_orderStatus`, `order2`.`shippingStatus` AS `order2_shippingStatus`, `order2`.`shippingId` AS `order2_shippingId`, `order2`.`shippingId2` AS `order2_shippingId2`, `order2`.`note` AS `order2_note`, `order2`.`deleteNote` AS `order2_deleteNote`, `order2`.`comment` AS `order2_comment`, `order2`.`printCounter` AS `order2_printCounter`, `order2`.`paymentStatus` AS `order2_paymentStatus`, `order2`.`deleted` AS `order2_deleted`, `order2`.`deletedDate` AS `order2_deletedDate`, `order2`.`batchId` AS `order2_batchId`, `order2`.`fulfillmentStatus` AS `order2_fulfillmentStatus`, `order2`.`shopId` AS `order2_shopId`, `order2`.`recommendedCarrierId` AS `order2_recommendedCarrierId`, `order2`.`serviceLevelId` AS `order2_serviceLevelId`, `order2`.`customerId` AS `order2_customerId`, `order2`.`shippingAddressId` AS `order2_shippingAddressId`, `order2`.`billingAddressId` AS `order2_billingAddressId`, `order2`.`orderBatchId` AS `order2_orderBatchId`, `order2`.`deliveryTransactionId` AS `order2_deliveryTransactionId`, `shippingAddress`.`id` AS `shippingAddress_id`, `shippingAddress`.`address1` AS `shippingAddress_address1`, `shippingAddress`.`address2` AS `shippingAddress_address2`, `shippingAddress`.`city` AS `shippingAddress_city`, `shippingAddress`.`province` AS `shippingAddress_province`, `shippingAddress`.`country` AS `shippingAddress_country`, `shippingAddress`.`zip` AS `shippingAddress_zip`, `shippingAddress`.`distributionLine` AS `shippingAddress_distributionLine`, `shippingAddress`.`distributionLineDescription` AS `shippingAddress_distributionLineDescription`, `shippingAddress`.`branchLine` AS `shippingAddress_branchLine`, `shippingAddress`.`branchLineDescription` AS `shippingAddress_branchLineDescription`, `billingAddress`.`id` AS `billingAddress_id`, `billingAddress`.`address1` AS `billingAddress_address1`, `billingAddress`.`address2` AS `billingAddress_address2`, `billingAddress`.`city` AS `billingAddress_city`, `billingAddress`.`province` AS `billingAddress_province`, `billingAddress`.`country` AS `billingAddress_country`, `billingAddress`.`zip` AS `billingAddress_zip`, `billingAddress`.`distributionLine` AS `billingAddress_distributionLine`, `billingAddress`.`distributionLineDescription` AS `billingAddress_distributionLineDescription`, `billingAddress`.`branchLine` AS `billingAddress_branchLine`, `billingAddress`.`branchLineDescription` AS `billingAddress_branchLineDescription`, `customer`.`customerId` AS `customer_customerId`, `customer`.`externalId` AS `customer_externalId`, `customer`.`firstName` AS `customer_firstName`, `customer`.`lastName` AS `customer_lastName`, `customer`.`email` AS `customer_email`, `customer`.`shopId` AS `customer_shopId`, `serviceLevel`.`id` AS `serviceLevel_id`, `serviceLevel`.`externalId` AS `serviceLevel_externalId`, `serviceLevel`.`code` AS `serviceLevel_code`, `serviceLevel`.`title` AS `serviceLevel_title`, `serviceLevel`.`fulfillmentTime` AS `serviceLevel_fulfillmentTime`, `serviceLevel`.`recommended` AS `serviceLevel_recommended`, `serviceLevel`.`shopId` AS `serviceLevel_shopId`, `serviceLevel`.`carrierId` AS `serviceLevel_carrierId`, `recommendedCarrier`.`id` AS `recommendedCarrier_id`, `recommendedCarrier`.`name` AS `recommendedCarrier_name`, `recommendedCarrier`.`customerProp1` AS `recommendedCarrier_customerProp1`, `recommendedCarrier`.`customerProp2` AS `recommendedCarrier_customerProp2`, `recommendedCarrier`.`secret` AS `recommendedCarrier_secret`, `recommendedCarrier`.`shopId` AS `recommendedCarrier_shopId`, `orderBatch`.`id` AS `orderBatch_id`, `orderBatch`.`name` AS `orderBatch_name`, `orderBatch`.`confirmed` AS `orderBatch_confirmed`, `orderBatch`.`status` AS `orderBatch_status`, `orderBatch`.`printCounter` AS `orderBatch_printCounter`, `orderBatch`.`createdDate` AS `orderBatch_createdDate`, `orderBatch`.`lastSync` AS `orderBatch_lastSync`, `orderBatch`.`failures` AS `orderBatch_failures`, `orderBatch`.`failCounter` AS `orderBatch_failCounter`, `orderBatch`.`shopId` AS `orderBatch_shopId`, `orderBatch`.`selectedCarrierId` AS `orderBatch_selectedCarrierId`, `orderBatch`.`serviceLevelId` AS `orderBatch_serviceLevelId`, `orderItems`.`id` AS `orderItems_id`, `orderItems`.`externalId` AS `orderItems_externalId`, `orderItems`.`price` AS `orderItems_price`, `orderItems`.`properties` AS `orderItems_properties`, `orderItems`.`quantity` AS `orderItems_quantity`, `orderItems`.`sku` AS `orderItems_sku`, `orderItems`.`discount` AS `orderItems_discount`, `orderItems`.`fulfillmentStatus` AS `orderItems_fulfillmentStatus`, `orderItems`.`fulfillableQuantity` AS `orderItems_fulfillableQuantity`, `orderItems`.`productId` AS `orderItems_productId`, `orderItems`.`orderId` AS `orderItems_orderId`, `orderItems`.`shopId` AS `orderItems_shopId`, `deliveryTransaction`.`id` AS `deliveryTransaction_id`, `deliveryTransaction`.`shippingId` AS `deliveryTransaction_shippingId`, `deliveryTransaction`.`shippingId2` AS `deliveryTransaction_shippingId2`, `deliveryTransaction`.`shippingId3` AS `deliveryTransaction_shippingId3`, `deliveryTransaction`.`gettDeliveryId` AS `deliveryTransaction_gettDeliveryId`, `deliveryTransaction`.`shippingStatus` AS `deliveryTransaction_shippingStatus`, `deliveryTransaction`.`shippingStatusCode` AS `deliveryTransaction_shippingStatusCode`, `deliveryTransaction`.`shippingStatusMoreInfo` AS `deliveryTransaction_shippingStatusMoreInfo`, `deliveryTransaction`.`translatedShippingStatus` AS `deliveryTransaction_translatedShippingStatus`, `deliveryTransaction`.`lastStatusUpdateTime` AS `deliveryTransaction_lastStatusUpdateTime`, `deliveryTransaction`.`driverName` AS `deliveryTransaction_driverName`, `deliveryTransaction`.`driverPhone` AS `deliveryTransaction_driverPhone`, `deliveryTransaction`.`driverId` AS `deliveryTransaction_driverId`, `deliveryTransaction`.`pickupLocationId` AS `deliveryTransaction_pickupLocationId`, `deliveryTransaction`.`pickupLocationAddress` AS `deliveryTransaction_pickupLocationAddress`, `deliveryTransaction`.`pickupLocationName` AS `deliveryTransaction_pickupLocationName`, `deliveryTransaction`.`pickupLocationPhone` AS `deliveryTransaction_pickupLocationPhone`, `deliveryTransaction`.`distributionLine` AS `deliveryTransaction_distributionLine`, `deliveryTransaction`.`distributionLineDescription` AS `deliveryTransaction_distributionLineDescription`, `deliveryTransaction`.`branchLine` AS `deliveryTransaction_branchLine`, `deliveryTransaction`.`branchLineDescription` AS `deliveryTransaction_branchLineDescription`, `deliveryTransaction`.`sortingAreaCode` AS `deliveryTransaction_sortingAreaCode`, `product`.`id` AS `product_id`, `product`.`externalId` AS `product_externalId`, `product`.`name` AS `product_name`, `product`.`productType` AS `product_productType`, `product`.`created` AS `product_created`, `product`.`image` AS `product_image`, `product`.`shopId` AS `product_shopId`, `selectedCarrier`.`id` AS `selectedCarrier_id`, `selectedCarrier`.`name` AS `selectedCarrier_name`, `selectedCarrier`.`customerProp1` AS `selectedCarrier_customerProp1`, `selectedCarrier`.`customerProp2` AS `selectedCarrier_customerProp2`, `selectedCarrier`.`secret` AS `selectedCarrier_secret`, `selectedCarrier`.`shopId` AS `selectedCarrier_shopId`, `orderTags`.`id` AS `orderTags_id`, `orderTags`.`name` AS `orderTags_name`, `orderTags`.`shopId` AS `orderTags_shopId`, `productTags`.`id` AS `productTags_id`, `productTags`.`name` AS `productTags_name`, `productTags`.`shopId` AS `productTags_shopId` FROM `order` `order2` LEFT JOIN `address` `shippingAddress` ON `shippingAddress`.`id`=`order2`.`shippingAddressId` LEFT JOIN `address` `billingAddress` ON `billingAddress`.`id`=`order2`.`billingAddressId` LEFT JOIN `customer` `customer` ON `customer`.`customerId`=`order2`.`customerId` LEFT JOIN `service_level` `serviceLevel` ON `serviceLevel`.`id`=`order2`.`serviceLevelId` LEFT JOIN `carrier` `recommendedCarrier` ON `recommendedCarrier`.`id`=`order2`.`recommendedCarrierId` LEFT JOIN `order_batch` `orderBatch` ON `orderBatch`.`id`=`order2`.`orderBatchId` LEFT JOIN `order_item` `orderItems` ON `orderItems`.`orderId`=`order2`.`id` LEFT JOIN `delivery_transaction` `deliveryTransaction` ON `deliveryTransaction`.`id`=`order2`.`deliveryTransactionId` LEFT JOIN `product` `product` ON `product`.`id`=`orderItems`.`productId` LEFT JOIN `carrier` `selectedCarrier` ON `selectedCarrier`.`id`=`orderBatch`.`selectedCarrierId` LEFT JOIN `order_order_tags_order_tag` `order2_orderTags` ON `order2_orderTags`.`orderId`=`order2`.`id` LEFT JOIN `order_tag` `orderTags` ON `orderTags`.`id`=`order2_orderTags`.`orderTagId` LEFT JOIN `product_product_tags_product_tag` `product_productTags` ON `product_productTags`.`productId`=`product`.`id` LEFT JOIN `product_tag` `productTags` ON `productTags`.`id`=`product_productTags`.`productTagId` INNER JOIN (SELECT distinct `order`.`id` AS `orderId2` FROM `order` `order` WHERE `order`.shopId=2 AND `order`.orderBatchId IS NULL LIMIT 100) `order4` ON order4.orderId2=`order2`.`id` WHERE `order2`.`shopId` = ? -- PARAMETERS: [2]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement