Skip to content

Instantly share code, notes, and snippets.

@jineshpaloor
Created June 22, 2015 17:11
Show Gist options
  • Select an option

  • Save jineshpaloor/d97665f0b4a544478454 to your computer and use it in GitHub Desktop.

Select an option

Save jineshpaloor/d97665f0b4a544478454 to your computer and use it in GitHub Desktop.
select s.pincode,dsc.center_name AS destination, count(airwaybill_number) as volume from service_centre_shipment s inner join location_servicecenter dsc on dsc.id = s.original_dest_id where rts_status<>1 and s.reverse_pickup=0 and dsc.center_shortcode in ('BOV', 'BOK', 'BOW', 'BMR', 'BHI','MBY', 'BOD', 'NBM', 'BOL', 'BDV', 'BOG', 'BOC', 'BAB', 'BKY', 'THN', 'VSI', 'SUB', 'SUA') and shipment_date between '2015-05-01' and '2015-06-30' group by s.pincode, dsc.center_name into outfile '/tmp/mumbai_volumes.csv' fields terminated by ',' optionally enclosed by '"' lines terminated by '\n';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment