Skip to content

Instantly share code, notes, and snippets.

@chriscooning
Created July 3, 2014 18:03
Show Gist options
  • Select an option

  • Save chriscooning/5a07365ce72dd5482c9a to your computer and use it in GitHub Desktop.

Select an option

Save chriscooning/5a07365ce72dd5482c9a to your computer and use it in GitHub Desktop.
postgresql query
SELECT "user_availabilities".* FROM "user_availabilities" WHERE "user_availabilities"."user_id" IN (8296, 8754, 9383, 7748, 8985, 9280, 9230, 9261, 1080, 9268, 7575, 7612, 8753, 7893, 7783, 7501, 8365, 9442, 9243, 4313, ... , 7336, 9343, 3457, 7746, 8215, 7641, 9245, 8426, 7890, 8370, 8032, 9295, 9418, 8435, 8078, 8413, 9152, 9283, 9072, 8120, 8952, 7743, 9370, 9147, 7886, 8891, 7478, 8464, 295, 8315, 8576, 7685, 9355, 8838, 9366, 7465, 7595, 8049, 8498, 8420, 8323, 2866, 2196, 7582, 2474, 8041, 2132, 563, 8376, 8064, 8767, 7767, 9057, 8031, 8367, 8746, 8039, 7675) AND "user_availabilities"."day_id" = 6 AND (user_availabilities.user_id NOT IN (27,34,59,60,63,77,133,134,136,137)) AND (user_availabilities.user_id NOT IN (7387,2837,8682,8116,8796,9428,8025,8754,9070,7919,7969,7647,7889,8526,7921,9154,9261,1080,7516,8789,7391,8736,7383,1525,7674,8753,9146,8611,7680,7893,8111,8379,2973,2008,8365,9432,9071,7552,7882,4313,2769,151,8423,162,7365,8126,8781,2135,2773,7452,7914,1539,8438,9013,1512,9259,8181,9135,8054,7892,9332,8188,7888,8504,7548,3008,9416,8117,8112,8042,9032,8175,8036,7695,137,9140,7549,7852,8718,9151,8957,7980,8312,7891,185,7505,7522,7539,7373,9051,7970,8034,136,9185,8787,9074,2818,8173,7981,196,3457,7553,8157,9139,8724,8043,8415,7684,7890,27,8370,8469,409,8032,8720,9418,9055,3456,842,7979,7677,8299,8413,8741,9152,9072,7687,8575,7682,8120,8952,8710,9147,7886,7478,7367,9143,8464,8792,7645,9333,8368,7377,7528,8576,8448,7362,8928,2013,8765,8241,2838,7685,336,2085,8372,8178,7465,8049,8208,8033,8874,8113,2880,8407,8323,2866,8799,8051,8041,2132,142,1066,7679,8375,8376,8456,8577,8180,8767,7976,1686,8606,8959,2855,8786,9057,3560,8031,7460,8367,8712,8746,8039,7675,8716,8669,8035,7926,8743,34,7504,763,7371,7544,7639,7448,7381,9149,134,7975,8295,59,7468,7758,193,7530,7853,7398,7382,2868,2021,7686,8133,8176,8569,8121,8174,7527,7701,8778,8881,7363,7936,8735,8717,7546,8129,8432,7978,9136,7671,2145,8046,7547,8639,8272,8300,7345,7983,8556,8760,8128,8773,8047,8795,8745,7524,7920,8411,9054,8468,7464,8052,9320,8030,8184,6139,8179,8373,8040,9144,9262,9417,8706,7376,9138,7463,7915,7545,8723,9201,9145,7378,8244,8028,7917,1349,8118,8713,8719,7928,7930,8378,8045,7971,8037,7973,7967,9141,8714,7711,8855,9148,7884,8608,7918,7550,8744,8027,77,7551,8371,8114,8293,8762,7965,8308,806,2497,8132,9431,8182,8048,8721,7496,8757,7459,8747,8466,8186,8115,8044,2828,8279,8301,8409,7676,8172,7934,8758,7972,2398,9137,7673,8785,7618,9237,7709,8414,7390,8125,8704,7623,7625,8433,8961,7885,8570,8187,9260,2709,7291,8211,2078,8130,9053,9210,8777,7503,7476,8752,7467,60,8609,9193,8454,9050,8412,8788,8177,327,8280,7953,5012,8607,8668,7704,8425,7523,7353,7977,9202,8369,8374,8437,8026,8416,8763,8050,9059,8313,9429,8210,7941,9058,8127,7397,9056,8024,8748,7525,8366,9334,8884,8055,8410,9310,8552,9142,9009,7630,8408,8764,7672,9238,8377,7462,7923,7924,7681,8029,7364,9150,8854,7646,9028,1051,9240,2657,8679,8856,2965,7634,8671,7927,8572,9430,9052,8277,8170,8119,8702,9414,7540,8131,8506,8160,133,7931,9020,7932,7984,8737,2625,8715,7461,8791,7386,7648,7982,8276,7966,8460,63,9073,8644,8793,7466,8521,7887,8774,8711,7529,7964,9153,7526,7922,8185,8038,8110,9239,8053,7683,7974,9415,7507)) LIMIT 10 OFFSET 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment