SQL: SELECT city,country,sum(events) ev FROM `joe` where country like 'aarhus' and action like 'hairdresser_%' group by 1,2 order by ev desc limit 1 ROWS: 0
SQL: SELECT city,country,sum(events) ev FROM `joe` where city like 'aarhus' and action like 'hairdresser_%' group by 1,2 order by ev desc limit 1 ROWS: 1 ROW 0: {"city":"Aarhus","country":"Denmark","ev":"68"}
SQL: SELECT sVal FROM `joe_settings` where sTopic like 'hairdresser' and sName like 'color' ROWS: 5 ROW 0: {"sVal":"'25' => '#f2b434'"} ROW 1: {"sVal":"'>25' => '#990099'"} ROW 2: {"sVal":"'20' => '#259c5d'"} ROW 3: {"sVal":"'10' => '#4882ef'"} ROW 4: {"sVal":"'0' => '#d7483f'"}
SQL: SELECT sVal FROM `joe_settings` where sTopic like 'hairdresser' and sName like 'nice' ROWS: 1 ROW 0: {"sVal":"a Hairdresser (or Barber, Hair stylist, etc.)"}
SQL: SELECT sVal FROM `joe_settings` where sTopic like 'hairdresser' and sName like 'niceTagline' ROWS: 0
SQL: SELECT CASE WHEN LOWER(action) LIKE 'hairdresser_>25' THEN 30 ELSE CAST(REPLACE(LOWER(action),'hairdresser_','') AS UNSIGNED) END AS action,sum(events) events FROM joe where lower(city) like 'Aarhus' and country like 'Denmark' and action like 'hairdresser_%' group by 1 order by action desc ROWS: 2 ROW 0: {"action":"20","events":"67"} ROW 1: {"action":"0","events":"1"}
SQL: SELECT CASE WHEN LOWER(action) LIKE 'hairdresser_>25' THEN 30 ELSE CAST(REPLACE(LOWER(action),'hairdresser_','') AS UNSIGNED) END AS action,sum(events) events FROM joe where country like 'Denmark' and action like 'hairdresser_%' group by 1 order by action desc ROWS: 5 ROW 0: {"action":"30","events":"2"} ROW 1: {"action":"25","events":"2"} ROW 2: {"action":"20","events":"94"} ROW 3: {"action":"10","events":"2"} ROW 4: {"action":"0","events":"3544"}
SQL: SELECT region, sum(action*events) action, sum(events) events from (SELECT CASE WHEN LOWER(action) LIKE 'hairdresser_>25' THEN 30 ELSE CAST(REPLACE(LOWER(action),'hairdresser_','') AS UNSIGNED) END AS action, region,sum(events) events FROM joe where country like 'Denmark' and action like 'hairdresser%' group by 1,2) g group by 1 ROWS: 5 ROW 0: {"region":"Capital Region of Denmark","action":"530","events":"2327"} ROW 1: {"region":"Central Denmark Region","action":"1400","events":"458"} ROW 2: {"region":"North Denmark Region","action":"0","events":"206"} ROW 3: {"region":"Region of Southern Denmark","action":"70","events":"30"} ROW 4: {"region":"Region Zealand","action":"10","events":"623"}
SQL: SELECT country, sum(action*events) action, sum(events) events from (SELECT CASE WHEN LOWER(action) LIKE 'hairdresser_>25' THEN 30 ELSE CAST(REPLACE(LOWER(action),'hairdresser_','') AS UNSIGNED) END AS action, country,sum(events) events FROM joe where country not like '(not set)' and action like 'hairdresser%' group by 1,2) g group by 1 having sum(events)>4 ROWS: 100 ROW 0: {"country":"Algeria","action":"10","events":"40"} ROW 1: {"country":"Argentina","action":"4210","events":"249"} ROW 2: {"country":"Armenia","action":"0","events":"321"} ROW 3: {"country":"Aruba","action":"20","events":"55"} ROW 4: {"country":"Australia","action":"95735","events":"68880"} ROW 5: {"country":"Austria","action":"8645","events":"1110"} ROW 6: {"country":"Bahrain","action":"2880","events":"290"} ROW 7: {"country":"Bangladesh","action":"55","events":"339"} ROW 8: {"country":"Belgium","action":"1135","events":"5256"} ROW 9: {"country":"Bermuda","action":"420","events":"21"}
SQL: SELECT lat, lon,t.city city, sum(action*events) action, sum(events) events from (SELECT CASE WHEN LOWER(action) LIKE 'hairdresser_>25' THEN 30 ELSE CAST(REPLACE(LOWER(action),'hairdresser_','') AS UNSIGNED) END AS action, city,sum(events) events FROM joe where country like 'Denmark' and action like 'hairdresser%' group by 1,2) t left join citiesLatLon ltln on t.city = ltln.city where lat is not null and t.city not like '(not set)' group by 1,2,3 having sum(events)>2 ROWS: 6 ROW 0: {"lat":"55.403756","lon":"10.40237","city":"Odense","action":"0","events":"19"} ROW 1: {"lat":"55.442952","lon":"11.791372","city":"Ringsted","action":"0","events":"69"} ROW 2: {"lat":"55.6760968","lon":"12.5683372","city":"Copenhagen","action":"530","events":"2079"} ROW 3: {"lat":"56.162939","lon":"10.203921","city":"Aarhus","action":"1340","events":"68"} ROW 4: {"lat":"56.176362","lon":"9.5549217","city":"Silkeborg","action":"0","events":"25"} ROW 5: {"lat":"56.48493","lon":"8.589933","city":"Struer","action":"0","events":"55"}
SQL: SELECT city,country,sum(events) ev FROM `joe` where country like 'Aarhus' and action like '{$action_string}_%' group by 1,2 order by ev desc limit 1 ROWS: 0
SQL: SELECT city,country,sum(events) ev FROM `joe` where city like 'Aarhus' and action like '{$action_string}_%' group by 1,2 order by ev desc limit 1 ROWS: 0SQL: SELECT * FROM joe where lower(city) like 'Aarhus' and country like 'Denmark' and action like '{$action_string}__%' order by events desc ROWS: 0
SQL: Select count(distinct country) countries,count(distinct city) cities,sum(case when action not in (select min(action) from joe where action like 'hairdresser_%') then events else 0 end) as love, sum(events) users from joe where action like 'hairdresser_%' ; ROWS: 1 ROW 0: {"countries":"145","cities":"4093","love":"304013","users":"699495"}
CITIES
Countries
USERS
Tip more than 0%
SQL: SELECT city from (SELECT city,sum(events) FROM ( SELECT * FROM joe) a left join ( select country country_2 FROM joe where lower(city) like 'Aarhus' order by events desc limit 1 ) b on a.country = b.country_2 where country_2 is not null and city not like 'Aarhus' and city not like '(not set)' group by 1 order by 2 desc ) yo limit 25 ROWS: 25 ROW 0: {"city":"Copenhagen"} ROW 1: {"city":"Aalborg"} ROW 2: {"city":"Naestved"} ROW 3: {"city":"Odense"} ROW 4: {"city":"Randers"} ROW 5: {"city":"Esbjerg"} ROW 6: {"city":"Ballerup"} ROW 7: {"city":"Herlev"} ROW 8: {"city":"Rudkobing"} ROW 9: {"city":"Graested"}Copenhagen - Aalborg - Naestved - Odense - Randers - Esbjerg - Ballerup - Herlev - Rudkobing - Graested - Kastrup - Nakskov - Roslev - Krusa - Holeby - Ringsted - Grenaa - Struer - Gentofte - Frederikshavn - Skorping - Birkerod - Videbaek - Frederiksberg - Hedehusene -
SQL: SELECT * FROM joe_serp WHERE city like 'Aarhus' ROWS: 0
SQL: SELECT city from ( SELECT city,sum(events) FROM joe WHERE city not like '(not set)' and city not like 'Aarhus' group by 1 order by 2 desc limit 100) c ORDER BY RAND() limit 20 ROWS: 20 ROW 0: {"city":"Washington"} ROW 1: {"city":"Seattle"} ROW 2: {"city":"Chicago"} ROW 3: {"city":"Charlotte"} ROW 4: {"city":"Oxford"} ROW 5: {"city":"Ottawa"} ROW 6: {"city":"Prague"} ROW 7: {"city":"Toronto"} ROW 8: {"city":"Copenhagen"} ROW 9: {"city":"Saskatoon"}Tipping in Leeds , Tipping in Irvine , Tipping in Kuala Lumpur , Tipping in Barcelona , Tipping in Tallinn , Tipping in Athens , Tipping in Oslo Municipality , Tipping in Dublin , Tipping in Nashville , Tipping in Christchurch , Tipping in San Diego , Tipping in Wellington , Tipping in Warsaw , Tipping in San Francisco , Tipping in Houston , Tipping in Helsinki , Tipping in Kitchener , Tipping in Riga , Tipping in Cape Town , Tipping in Burnaby ,