Skip to content

Instantly share code, notes, and snippets.

@ghadishayban
Last active August 29, 2015 13:58
Show Gist options
  • Save ghadishayban/10169826 to your computer and use it in GitHub Desktop.
Save ghadishayban/10169826 to your computer and use it in GitHub Desktop.
LB 4/3 qry
-- these are for daily
-- generated by accompanying code
select * from delivery_stats where delivery_id in
(66124923, 66124925, 66124927, 66124929, 66124931, 66124933, 66124935, 66124937, 66124939, 66124941, 66124943, 66124945, 66124947, 66124949, 66124951, 66124953, 66124955, 66124957, 66124959, 66129249, 66129251, 66129253, 66129255, 66129257, 66129259, 66129261, 66129263, 66129265, 66129267, 66129269, 66129271, 66129273, 66129275, 66129277, 66129279, 66129281, 66129283, 66129285, 66129287, 66129289, 66129291, 66129293, 66129299, 66129301, 66129303, 66129305, 66129307, 66129311, 66124879, 66124883, 66124885, 66124887, 66124889, 66124891, 66124893, 66124895, 66124897, 66124899, 66124901, 66124903, 66124905, 66124907, 66124915, 66124919, 66124921, 66128365, 66128383, 66128255, 66128257, 66128259, 66128261, 66128263, 66128265, 66128269, 66128271, 66128273, 66128275, 66128281, 66128283, 66128285, 66128287, 66128289, 66128291, 66128293, 66128295, 66128297, 66128301, 66128305, 66128307, 66128309, 66128313, 66128315, 66128317, 66128319, 66128321, 66128323, 66128325, 66128327, 66128329, 66128331, 66128333, 66128335, 66128337, 66128339, 66128341, 66128343, 66128345, 66128353, 66128355, 66128359, 66128361, 66128363, 66128367, 66128369, 66128371, 66128373, 66128375, 66128377, 66128379, 66128385, 66128387, 66128389, 66128391, 66128393, 66128395, 66128397, 66128399, 66128401, 66128403, 66128405, 66128407, 66128411, 66128413, 66128417, 66128425, 66128429, 66128431, 66128433, 66128435, 66128437, 66128439, 66128441, 66128443, 66128445, 66128447, 66128449, 66128451, 66128453, 66128457, 66128459, 66128461, 66128463, 66128465, 66128467, 66128469, 66128471, 66128473, 66128475, 66128477, 66128797, 66128799, 66128801, 66128803, 66128805, 66128807, 66128809, 66128811, 66128813, 66128815, 66128817, 66128819, 66128821, 66128823, 66128829, 66128833, 66128835, 66128837, 66128839, 66128841, 66128843, 66128845, 66128847, 66128849, 66128851, 66128853, 66128855, 66128857, 66128859, 66128861, 66128863, 66128865, 66128867, 66128869, 66128871, 66128875, 66128877, 66128879, 66128881, 66128883, 66128885, 66128887, 66128889, 66128891, 66128895, 66128901, 66128905, 66128907, 66128909, 66128911, 66128913, 66128915, 66128917, 66128919, 66128921, 66128923, 66128925, 66128927, 66128929, 66128931, 66128933, 66128935, 66128939, 66128941, 66128943, 66128945, 66128949, 66128951, 66128953, 66128955, 66128957, 66128959, 66128963, 66128965, 66128967, 66128969, 66128971, 66128973, 66128975, 66128977, 66128979, 66128981, 66128983, 66128985, 66128987, 66128989, 66128991, 66128993, 66128995, 66128997, 66128999, 66129001, 66129003, 66129005, 66129009, 66129011, 66129013, 66129015, 66129017, 66129021, 66129025, 66129029, 66129031, 66129035, 66129037, 66129039, 66129041, 66129043, 66129045, 66129047, 66129049, 66129051, 66129053, 66129055, 66129057, 66129059, 66129061, 66129063, 66129065, 66129067, 66129069, 66129071, 66129073, 66129075)
order by (duplicate_count / recipient_count) desc
(->> (del/find-all-by-params {:type "scheduled" :tags ["letsbonus" "daily"]
:start_time #inst "2014-04-03"
:end_time #inst "2014-04-03T23"})
(remove (comp #(get % "preview") set :tags))
(map :id)
(into #{}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment