select t.video_id from tbl_videos as t  join tbl_video_theme_subtheme_mapping as  sb on (t.video_id = sb.video_id)  join tbl_themes as  th on (th.theme_id = sb.theme_id)  join tbl_video_tag_mapping as  vtm on (vtm.video_id = t.video_id)  join tbl_tags as  tt on (tt.tag_id = vtm.tag_id) left join tbl_sub_themes as  st on (st.sub_theme_id = sb.sub_theme_id) left join tbl_video_country_location_mapping as  tclm on (tclm.video_id = t.video_id)  join tbl_country_location as  tcl on (tcl.country_location_id = tclm.country_location_id)  join countries as  tc on (tc.country_id = tcl.country_id)  where  1=1  && (th.theme_name REGEXP '[[:<:]]Pacific[[:>:]]' OR st.sub_theme_name REGEXP '[[:<:]]Pacific[[:>:]]' OR t.video_title REGEXP '[[:<:]]Pacific[[:>:]]' OR t.reel_number REGEXP '[[:<:]]Pacific[[:>:]]' OR tt.tag_name REGEXP '[[:<:]]Pacific[[:>:]]'  )  group by t.video_id67,76,349,728,740,747,763,1014,1180,1181,1211,1235,1239,1248,1251,1414,1512,1581,1673,1675,1684,1743,1750,1759,1766,1775,1785,1789,1793,1804,1808,1819,1839,1847,1855,1859,1873,1886,1892,1899,1911,1915,1918,1925,2120,2141,2199,2241,2422,2748,2753,2797,2802,2901,2921,3113,3245,3276,3279,3285,3387,3395,3413,3415,3417,3422,3423,3428,3430,3440,3442,3449,3459,3465,3479,3482,3489,3493,3513,3515,3518,3552,3558,3559,3565,3721,3730,3791,3815,3819,3822,3824,3827,3900,3905,3918,3925,3929,3935,3941,3946,3954,3961,3984,3986,3990,4016,4024,4030,4038,4051,4055,4060,4069,4072,4085,4090,4097,4103,4108,4115,4119,4121,4124,4129,4134,4150,4157,4160,4163,4178,4190,4200,4214,4218,4229,4245,4254,4273,4283,4285,4292,4295,4301,4302,4322,4328,4334,4340,4344,4348,4354,4377,4385,4397,4405,4412,4418,4422,4430,4433,4437,4442,4451,4459,4462,4466,4467,4469,4470,4477,4479,4487,4500,4501,4507,4509,4517,4519,4534,4538,4542,4548,4553,4619,4624,4627,4630,4633,4638,4641,4644,4648,4678,4701,4721,4729,4735,4740,4743,4750,4756,4771,4777,4782,4788,4792,4803,4809,4819,4826,4841,4845,4853,4859,4867,4872,4873,4884,4903,4910,4915,4922,4927,5000,5007,5011,5014,5270,5305,5353,5586,5589,5604,5608,5647,5669,5738,5803,5814,5830,5866,5869,5873,5884,5887,5896,5910,5916,5918,5924,5984,6006,6012,6020,6022,6099,6177,6202,6278,6279,6281,6302,6349,6452,6455,6478,6493,6501,6508,6509,6519,6539,6591,6593,6613,6626,6627,6631,6650,6680,6729,6732,6748,6767,6873,6886,6889,6897,6904,6908,6969,6975,6980,6984,7001,7038,7041,7054,7056,7057,7060,7151,7176,7211,7240,7260,7263,7267,7270,7328,7382,7393,7506,7594,7606,7663,7667,7671,7673,7685,7701,7718,7756,7776,7832,7848,7877,7884,7914,7922,7930,7953,7983,8005,8010,8012,8016,8037,8060,8064,8069,8073,8078,8082,8083,8119,8150,8156,8179,8188,8210,8231,8237,8294,8346,8378,8394,8403,8473,8484,8485,8489,8496,8546,8553,8562,8564,8566,8593,8597,8620,8700,8866,9043,9079,9082,9105,9291,9365,9505,9571,9578,9582,9591,9594,9597,9601,9604,9643,9834,9839,9882,9884,9887,9893,9901,10243,10251,10283,10347,10359,10551,11017,11104,11202,11207,11230,11270,11334,11576,11579,11582,11585,11591,11597,11602,11608,11610,11642,11752,11767,11816,11927,12022,12032,12182,12189,12194,12197,12200,12203,12214,12217,12220,12227,12229,12238,12239,12260,12267,12275,12283,12328,12332,12336,12340,12341,12346,12353,12371,12454,12604,12734,12887,12897,12905,12909,12917,12922,12925,12928,13003,13074,13079,13085,13089,13092,13094,13121,13223,13236,13408,13456,13483,13542,13801,13825,13827,13829,13843,13845,13848,13850,13882,13907,13914,14002,14009,14295,14485,14550,14560,14564,14575,14674,14845,14935,14937,14939,14942,14943,14946,14950,14951,14964,14969,14972,14978,14980,14984,14987,15000,15015,15026,15036,15038,15040,15053,15150,15154,15213,15219,15224,15352,15594,15601,15607,15772,15775,15789,15792,15794,15811,15815,16008,16171,16173,16176,16382,16496,16500,16526,16568,16673,17080,17083,17086,17090,17107,17115,17142,17194,17196,17291,17293,17295,17494,17519,17672,17674,17886,17942,17945,17947,17984,18156,18227,18231,18232,18452,18663,18664,18752,18754,18762,18797,18799,18817,18842,18895,18911,18912,18913,18914,18921,18923,18924,18925,18992,19030,19031,19032,19033,19035,19036,19037,19122,19226,19230,19231,19282,19284,19294,19335,19337,19341,19343,19345,19361,19363,19365,19400,19401,19419,19438,19440,19482,19483,19484,19485,19486,19487,19508,19569,19572,19573,19574,19580,19581,19587,19591,19593,19664,19730,19784,19853,19938,20000,20001,20002,20020,20059,20060,20061,20183,20204,20205,20207,20208,20211,20219,20220,20221,20225,20280,20281,20282,20283,20284,20294,20296,20297,20298,20478,20480,20494,20495,20496,20497,20508,20509,20534,20535,20542,20547,20597,20636,20638,20639,20640,20641,20642,20643,20644,20645,20652,20654,20655,20698,20702,20703,20704,20705,20707,20708,20724,20725,20728,20729,20731,20746,20748,20749,20750,20751,20752,20754,20755,20758,20759,20760,20761,20762,20763,20765,20803,20805,20830,20831,20832,20866,20867,20869,20893,20896,20897,20898,20906,20907,20922,20923,20924,20925,20929,20965,20971,20972,20973,20974,20977,20978,20983,20984,20985,20986,20987,20989,20990,20994,20995,20996,20997,21000,21001,21025,21026,21027,21028,21029,21030,21032,21033,21034,21035,21041,21046,21047,21049,21050,21051,21098,21099,21112,21113,21116,21117,21214,21261,21263,21265,21266,21295,21296,21302,21303,21311,21314,21315,21316,21317,21323,21324,21325,21326,21328,21329,21335,21336,21337,21338,21406,21591,21623,21630,21677,21710,21728,21729,21948,21950,22069,22070,22071,22072,22073,22216,22220,22222,22223,22224,22225,22226,22227,22229,22230,22231,22232,22233,22234,22235,22236,22237,22245,22246,22247,22248,22249,22251,22254,22255,22256,22257,22258,22259,22260,22261,22262,22263,22264,22265,22266,22267,22268,22269,22270,22271,22272,22273,22274,22275,22276,22277,22278,22279,22280,22281,22283,22284,22287,22288,22289,22290,22291,22293,22294,22295,22296,22297,22298,22299,22300,22302,22303,22304,22305,22306,22307,22308,22309,22310,22311,22312,22313,22314,22315,22324,22332,22333,22334,22335,22343,22344,22345,22346,22348,22350,22351,22352,22353,22354,22355,22361,22367,22369,22381,22397,22403,22404,22410,22411,22412,22413,22415,22416,22418,22419,22420,22421,22422,22423,22424,22425,22426,22429,22430,22431,22432,22433,22434,22435,22436,22437,22438,22439,22440,22441,22442,22443,22444,22445,22446,22447,22448,22449,22450,22458,22459,22460,22461,22462,22463,22464,22465,22466,22467,22481,22482,22483,22484,22485,22486,22487,22488,22489,22490,22491,22492,22493,22494,22495,22496,22497,22498,22502,22503,22504,22505,22506,22507,22508,22509,22510,22511,22512,22513,22514,22515,22516,22517,22518,22519,22521,22525,22526,22532,22534,22536,22537,22538,22539,22540,22541,22542,22543,22544,22545,22546,22548,22549,22550,22551,22552,22553,22561,22562,22563,22564,22565,22566,22567,22568,22569,22570,22571,22572,22573,22574,22575,22576,22577,22578,22579,22580,22581,22582,22583,22584,22585,22586,22587,22588,22589,22590,22591,22592,22593,22594,22595,22596,22597,22598,22599,22600,22601,22602,22615,22640,22641,22642,22643,22646,22692,22693,22694,22695,22696,22697,22698,22699,22700,22701,22702,22703,22704,22705,22706,22707,22708,22709,22710,22711,22712,22713,22714,22715,22716,22717,22718,22719,22720,22721,22722,22723,22724,22725,22726,22727,22728,22729,22730,22731,22743,22746,22749,22751,22756,22757,22758,22773,22781,22835,22836,22839,22927,22959,22963,22969,23066,23087,23186