1317:Query execution was interrupted SQL:SELECT DISTINCT c.*, (IF(c.txtListingLevel='Premium',0,IF(c.txtListingLevel='Paid',1,2))+RAND()) AS llOrder, MAX(d.txtShortTitle) AS projectTitle , MAX(e.market_name) AS marketName , (RAND() + IF(LOWER(txtListingLevel)='premium',2,IF(LOWER(txtListingLevel)='standard',1,0))) AS randSort , LOWER(txtListingLevel) AS txtListingLevell FROM tbl_photos a JOIN tbl_photoprojects a1 ON (a.photo_uid = a1.photo_uid) JOIN tblSpecialistProject b ON (a1.intProjectID = b.intProjectID) JOIN tblSpecialist c ON (b.intSpecialistID = c.intSpecialistID AND (CURDATE() BETWEEN c.dteStart AND c.dteStop) AND c.txtListingLevel!='deleted' ) JOIN tblProjects d ON (a1.intProjectID = d.intProjectID) JOIN market e ON (c.intMarketID = e.marketID) WHERE a.jobsite_uid = 948 GROUP BY c.intSpecialistID ORDER BY marketName, randSort DESC ;