CREATE ALGORITHM=UNDEFINED DEFINER=`datendesign`@`localhost` SQL SECURITY DEFINER VIEW `v_frauen_maenner` AS (select `d`.`name` AS `bundesland`,`c`.`state_id` AS `state_id`,`a`.`gemeinde` AS `gemeinde`,(`a`.`bevinsg` / 1000000) AS `bevinsg`,(8 * sqrt((`a`.`bevinsg` / 1000000))) AS `transbev`,`c`.`lat` AS `lat`,`c`.`lng` AS `lng`,(`a`.`bevw` / `a`.`bevm`) AS `wm` from (((`gemeinden` `a` join `zipcode` `b`) join `city` `c`) join `state` `d`) where ((`a`.`plz` = `b`.`zipcode`) and (`b`.`city_id` = `c`.`id`) and (`c`.`state_id` = `d`.`id`)));