SQL: SELECT city,country,sum(events) ev FROM `joe` where country like 'basel' 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 'basel' and action like 'hairdresser_%' group by 1,2 order by ev desc limit 1 ROWS: 1 ROW 0: {"city":"Basel","country":"Switzerland","ev":"977"}
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 'Basel' and country like 'Switzerland' and action like 'hairdresser_%' group by 1 order by action desc ROWS: 3 ROW 0: {"action":"20","events":"291"} ROW 1: {"action":"10","events":"367"} ROW 2: {"action":"0","events":"319"}
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 'Switzerland' and action like 'hairdresser_%' group by 1 order by action desc ROWS: 5 ROW 0: {"action":"30","events":"194"} ROW 1: {"action":"25","events":"496"} ROW 2: {"action":"20","events":"483"} ROW 3: {"action":"10","events":"2293"} ROW 4: {"action":"0","events":"3213"}
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 'Switzerland' and action like 'hairdresser%' group by 1,2) g group by 1 ROWS: 17 ROW 0: {"region":"Aargau","action":"30","events":"5"} ROW 1: {"region":"Basel City","action":"9990","events":"1002"} ROW 2: {"region":"Basel-Landschaft","action":"0","events":"3"} ROW 3: {"region":"Canton of Bern","action":"5720","events":"1060"} ROW 4: {"region":"Canton of Neuchatel","action":"0","events":"1"} ROW 5: {"region":"Canton of Zug","action":"20","events":"4"} ROW 6: {"region":"Fribourg","action":"0","events":"2"} ROW 7: {"region":"Geneva","action":"790","events":"42"} ROW 8: {"region":"Grisons","action":"10","events":"2"} ROW 9: {"region":"Lucerne","action":"340","events":"1166"}
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 'Switzerland' 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: 7 ROW 0: {"lat":"42.8679836","lon":"-76.985557","city":"Geneva","action":"790","events":"41"} ROW 1: {"lat":"46.2043907","lon":"6.1431577","city":"Geneva","action":"790","events":"41"} ROW 2: {"lat":"46.9479739","lon":"7.4474468","city":"Bern","action":"5700","events":"570"} ROW 3: {"lat":"47.0501682","lon":"8.3093072","city":"Lucerne","action":"10","events":"567"} ROW 4: {"lat":"47.3768866","lon":"8.541694","city":"Zurich","action":"8010","events":"1075"} ROW 5: {"lat":"47.4244818","lon":"9.3767173","city":"St. Gallen","action":"2180","events":"110"} ROW 6: {"lat":"47.5595986","lon":"7.5885761","city":"Basel","action":"9490","events":"977"}
SQL: SELECT city,country,sum(events) ev FROM `joe` where country like 'Basel' 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 'Basel' and action like '{$action_string}_%' group by 1,2 order by ev desc limit 1 ROWS: 0SQL: SELECT * FROM joe where lower(city) like 'Basel' and country like 'Switzerland' 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 'Basel' order by events desc limit 1 ) b on a.country = b.country_2 where country_2 is not null and city not like 'Basel' and city not like '(not set)' group by 1 order by 2 desc ) yo limit 25 ROWS: 25 ROW 0: {"city":"Zurich"} ROW 1: {"city":"Geneva"} ROW 2: {"city":"Bern"} ROW 3: {"city":"Winterthur"} ROW 4: {"city":"Lugano"} ROW 5: {"city":"Allschwil"} ROW 6: {"city":"Herzogenbuchsee"} ROW 7: {"city":"Lucerne"} ROW 8: {"city":"Obersiggenthal"} ROW 9: {"city":"Baden"}Zurich - Geneva - Bern - Winterthur - Lugano - Allschwil - Herzogenbuchsee - Lucerne - Obersiggenthal - Baden - Kreuzlingen - Cham - Vernier - Kriens - Dietikon - Herrliberg - Crans-Montana - Olten - Biel/Bienne - Lausanne - Fribourg - Therwil - Lancy - Aesch - Thalwil -
SQL: SELECT * FROM joe_serp WHERE city like 'Basel' ROWS: 0
SQL: SELECT city from ( SELECT city,sum(events) FROM joe WHERE city not like '(not set)' and city not like 'Basel' group by 1 order by 2 desc limit 100) c ORDER BY RAND() limit 20 ROWS: 20 ROW 0: {"city":"Frankfurt"} ROW 1: {"city":"Philadelphia"} ROW 2: {"city":"Glasgow"} ROW 3: {"city":"Istanbul"} ROW 4: {"city":"Portland"} ROW 5: {"city":"Edmonton"} ROW 6: {"city":"Kitchener"} ROW 7: {"city":"San Jose"} ROW 8: {"city":"Kuala Lumpur"} ROW 9: {"city":"Seattle"}Tipping in Brussels , Tipping in Orlando , Tipping in Toronto , Tipping in Dublin , Tipping in Bristol , Tipping in Helsinki , Tipping in Kuala Lumpur , Tipping in Stockholm , Tipping in Tallinn , Tipping in Perth , Tipping in Manchester , Tipping in Ottawa , Tipping in Nashville , Tipping in The Hague , Tipping in Honolulu , Tipping in London , Tipping in Quezon City , Tipping in Sacramento , Tipping in Kitchener , Tipping in Victoria ,