Skip to content

Instantly share code, notes, and snippets.

@adamgibbons
Created August 26, 2016 20:42
Show Gist options
  • Save adamgibbons/14ded05e6841ee0af0c31f4e95cd506a to your computer and use it in GitHub Desktop.
Save adamgibbons/14ded05e6841ee0af0c31f4e95cd506a to your computer and use it in GitHub Desktop.
service fulfillments output
Executing (default): SELECT "serviceFulfillment"."id", "serviceFulfillment"."state", "serviceFulfillment"."service_provider_type", "serviceFulfillment"."created_at", "serviceFulfillment"."updated_at", "serviceFulfillment"."move_id", "serv
iceFulfillment"."branch_id", "move"."id" AS "move.id", "move"."publicId" AS "move.publicId", "move"."inventory_method_selection" AS "move.inventory_method_selection", "move"."item_count" AS "move.item_count", "move"."excluded_item_count"
AS "move.excluded_item_count", "move"."mileage" AS "move.mileage", "move"."volume" AS "move.volume", "move"."excluded_volume" AS "move.excluded_volume", "move"."weight" AS "move.weight", "move"."excluded_weight" AS "move.excluded_weight",
"move"."move_step" AS "move.move_step", "move"."inventory_approved" AS "move.inventory_approved", "move"."inventory_ready_for_customer" AS "move.inventory_ready_for_customer", "move"."estimated_weight" AS "move.estimated_weight", "move".
"confirmed_weight" AS "move.confirmed_weight", "move"."survey_notes" AS "move.survey_notes", "move"."requested_pickup_date_start" AS "move.requested_pickup_date_start", "move"."scheduled_trailer_origin_drop_date" AS "move.scheduled_traile
r_origin_drop_date", "move"."scheduled_trailer_origin_pickup_date" AS "move.scheduled_trailer_origin_pickup_date", "move"."scheduled_delivery_date" AS "move.scheduled_delivery_date", "move"."transport_id" AS "move.transport_id", "move"."s
hipment_status" AS "move.shipment_status", "move"."external_order_number" AS "move.external_order_number", "move"."pro_number" AS "move.pro_number", "move"."created_at" AS "move.created_at", "move"."updated_at" AS "move.updated_at", "move
"."customer_id" AS "move.customer_id", "move"."account_executive_id" AS "move.account_executive_id", "move"."booking_agent_id" AS "move.booking_agent_id", "move"."surveyor_id" AS "move.surveyor_id", "move"."cuber_id" AS "move.cuber_id", "
move"."coordinator_id" AS "move.coordinator_id", "move"."referrer_id" AS "move.referrer_id", "move"."osp_dispatcher_id" AS "move.osp_dispatcher_id", "move"."dsp_dispatcher_id" AS "move.dsp_dispatcher_id", "move"."tsp_dispatcher_id" AS "mo
ve.tsp_dispatcher_id", "move"."video_survey_branch_id" AS "move.video_survey_branch_id", "move"."referring_branch_id" AS "move.referring_branch_id", "move"."current_quote_id" AS "move.current_quote_id", "move"."survey_request_id" AS "move
.survey_request_id", "move"."osp_fulfillment_id" AS "move.osp_fulfillment_id", "move"."dsp_fulfillment_id" AS "move.dsp_fulfillment_id", "move.currentQuote"."id" AS "move.currentQuote.id", "move.currentQuote"."publicId" AS "move.currentQu
ote.publicId", "move.currentQuote"."original_params" AS "move.currentQuote.originalParams", "move.currentQuote"."total_shipper_price" AS "move.currentQuote.totalShipperPrice", "move.currentQuote"."total_freightline_fee" AS "move.currentQu
ote.totalFreightlineFee", "move.currentQuote"."total_booking_partner_fee" AS "move.currentQuote.totalBookingPartnerFee", "move.currentQuote"."weight" AS "move.currentQuote.weight", "move.currentQuote"."applied_weight" AS "move.currentQuot
e.appliedWeight", "move.currentQuote"."shipper_origin_zip_code" AS "move.currentQuote.shipperOriginZipCode", "move.currentQuote"."shipper_destination_zip_code" AS "move.currentQuote.shipperDestinationZipCode", "move.currentQuote"."applied
_origin_zip_code" AS "move.currentQuote.appliedOriginZipCode", "move.currentQuote"."applied_destination_zip_code" AS "move.currentQuote.appliedDestinationZipCode", "move.currentQuote"."linear_feet" AS "move.currentQuote.linearFeet", "move
.currentQuote"."reference_number" AS "move.currentQuote.referenceNumber", "move.currentQuote"."freight_response" AS "move.currentQuote.freightResponse", "move.currentQuote"."pricing_terms" AS "move.currentQuote.pricingTerms", "move.curren
tQuote"."status" AS "move.currentQuote.status", "move.currentQuote"."valuation" AS "move.currentQuote.valuation", "move.currentQuote"."pricing" AS "move.currentQuote.pricing", "move.currentQuote"."branch_service_areas" AS "move.currentQuo
te.branchServiceAreas", "move.currentQuote"."created_at" AS "move.currentQuote.created_at", "move.currentQuote"."updated_at" AS "move.currentQuote.updated_at", "move.currentQuote"."creator_id" AS "move.currentQuote.creator_id", "move.curr
entQuote"."move_id" AS "move.currentQuote.move_id", "move.currentQuote"."osp_id" AS "move.currentQuote.osp_id", "move.currentQuote"."dsp_id" AS "move.currentQuote.dsp_id", "move.currentQuote"."tsp_id" AS "move.currentQuote.tsp_id", "move.
currentQuote.quoteServices"."id" AS "move.currentQuote.quoteServices.id", "move.currentQuote.quoteServices"."base_cost" AS "move.currentQuote.quoteServices.baseCost", "move.currentQuote.quoteServices"."freightline_fee" AS "move.currentQuo
te.quoteServices.freightlineFee", "move.currentQuote.quoteServices"."freightline_percent" AS "move.currentQuote.quoteServices.freightlinePercent", "move.currentQuote.quoteServices"."booking_partner_fee" AS "move.currentQuote.quoteServices
.bookingPartnerFee", "move.currentQuote.quoteServices"."booking_partner_percent" AS "move.currentQuote.quoteServices.bookingPartnerPercent", "move.currentQuote.quoteServices"."peak_pricing_markup" AS "move.currentQuote.quoteServices.peakP
ricingMarkup", "move.currentQuote.quoteServices"."peak_pricing_percent" AS "move.currentQuote.quoteServices.peakPricingPercent", "move.currentQuote.quoteServices"."shipper_price" AS "move.currentQuote.quoteServices.shipperPrice", "move.cu
rrentQuote.quoteServices"."service_type" AS "move.currentQuote.quoteServices.serviceType", "move.currentQuote.quoteServices"."option_key" AS "move.currentQuote.quoteServices.optionKey", "move.currentQuote.quoteServices"."name" AS "move.cu
rrentQuote.quoteServices.name", "move.currentQuote.quoteServices"."metadata" AS "move.currentQuote.quoteServices.metadata", "move.currentQuote.quoteServices"."exclude" AS "move.currentQuote.quoteServices.exclude", "move.currentQuote.quote
Services"."created_at" AS "move.currentQuote.quoteServices.created_at", "move.currentQuote.quoteServices"."updated_at" AS "move.currentQuote.quoteServices.updated_at", "move.currentQuote.quoteServices"."quote_id" AS "move.currentQuote.quo
teServices.quote_id", "move.customer"."id" AS "move.customer.id", "move.customer"."publicId" AS "move.customer.publicId", "move.customer"."name" AS "move.customer.name", "move.customer"."phone" AS "move.customer.phone", "move.customer"."p
hone_ext" AS "move.customer.phone_ext", "move.customer"."email" AS "move.customer.email", "move.customer"."encrypted_password" AS "move.customer.encrypted_password", "move.customer"."reset_token" AS "move.customer.reset_token", "move.cust
omer"."reset_token_expiration_date" AS "move.customer.reset_token_expiration_date", "move.customer"."video_user" AS "move.customer.video_user", "move.customer"."local_timezone" AS "move.customer.local_timezone", "move.customer"."created_a
t" AS "move.customer.created_at", "move.customer"."updated_at" AS "move.customer.updated_at", "move.customer"."organization_id" AS "move.customer.organization_id", "move.locations"."id" AS "move.locations.id", "move.locations"."name" AS "
move.locations.name", "move.locations"."type" AS "move.locations.type", "move.locations"."address" AS "move.locations.address", "move.locations"."secondary_address" AS "move.locations.secondary_address", "move.locations"."city" AS "move.l
ocations.city", "move.locations"."state" AS "move.locations.state", "move.locations"."zip_code" AS "move.locations.zip_code", "move.locations"."building_type" AS "move.locations.building_type", "move.locations"."building_floor_count" AS "
move.locations.building_floor_count", "move.locations"."building_floor" AS "move.locations.building_floor", "move.locations"."building_has_elevator" AS "move.locations.building_has_elevator", "move.locations"."building_requirements" AS "m
ove.locations.building_requirements", "move.locations"."building_elevator_type" AS "move.locations.building_elevator_type", "move.locations"."parking_permit" AS "move.locations.parking_permit", "move.locations"."certificate_of_insurance"
AS "move.locations.certificate_of_insurance", "move.locations"."excessive_distance" AS "move.locations.excessive_distance", "move.locations"."requested_date_start" AS "move.locations.requested_date_start", "move.locations"."requested_date
_end" AS "move.locations.requested_date_end", "move.locations"."requested_packing_date_start" AS "move.locations.requested_packing_date_start", "move.locations"."requested_packing_date_end" AS "move.locations.requested_packing_date_end",
"move.locations"."shuttle" AS "move.locations.shuttle", "move.locations"."dimension_one" AS "move.locations.dimension_one", "move.locations"."dimension_two" AS "move.locations.dimension_two", "move.locations"."primary" AS "move.locations.
primary", "move.locations"."created_at" AS "move.locations.created_at", "move.locations"."updated_at" AS "move.locations.updated_at", "move.locations"."move_id" AS "move.locations.move_id" FROM "service_fulfillments" AS "serviceFulfillmen
t" LEFT OUTER JOIN "moves" AS "move" ON "serviceFulfillment"."move_id" = "move"."id" LEFT OUTER JOIN "quotes" AS "move.currentQuote" ON "move"."current_quote_id" = "move.currentQuote"."id" LEFT OUTER JOIN "quote_services" AS "move.current
Quote.quoteServices" ON "move.currentQuote"."id" = "move.currentQuote.quoteServices"."quote_id" LEFT OUTER JOIN "users" AS "move.customer" ON "move"."customer_id" = "move.customer"."id" LEFT OUTER JOIN "locations" AS "move.locations" ON "
move"."id" = "move.locations"."move_id" WHERE "serviceFulfillment"."state" = 'offered,accepted,rejected';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment