 -- https://www.phpmyadmin.net
 --
 -- Host: localhost
--- Generation Time: Jun 27, 2017 at 12:31 AM
+-- Generation Time: Jun 27, 2017 at 02:00 AM
 -- Server version: 10.0.29-MariaDB
 -- PHP Version: 5.6.30
 

--
DROP TABLE IF EXISTS `lc60_share_holders_participant`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `lc60_share_holders_participant` AS select `subtask_share_holder`.`subtask_id` AS `subtask_id`,`participant`.`id` AS `participant_id`,`participant`.`participant_name` AS `participant_name` from (`lc60_subtask_share_holder` `subtask_share_holder` join `lc60_participants` `participant` on((`subtask_share_holder`.`participant_id` = `participant`.`id`)));

-- --------------------------------------------------------


--
DROP TABLE IF EXISTS `lc60_demand_view_uncomplete_contemporary_demand`;

CREATE ALGORITHM=UNDEFINED DEFINER=`tggtt`@`localhost` SQL SECURITY DEFINER VIEW `lc60_demand_view_uncomplete_contemporary_demand` AS select `current_task`.`task_id` AS `current_task_id`,`subtask`.`task_id` AS `contemporary_task_id`,`subtask`.`id` AS `subtask_id`,`subtask`.`subtask_starting_demand` AS `subtask_starting_demand`,0 AS `subtask_success_count`,0 AS `subtask_success_count_total`,`subtask`.`subtask_task_period_demand` AS `subtask_task_period_demand`,`subtask`.`task_id` AS `subtask_task_id`,`subtask`.`subtask_super_id` AS `subtask_super_id`,`subtask`.`subtask_name` AS `subtask_name`,`subtask`.`subtask_category_id` AS `subtask_category_id`,`subtask`.`subtask_base_value` AS `subtask_base_value`,`subtask`.`subtask_max_value` AS `subtask_max_value`,`subtask`.`subtask_inflation_rate` AS `subtask_inflation_rate`,`subtask`.`subtask_demand_cutoff` AS `subtask_demand_cutoff`,`subtask`.`subtask_description` AS `subtask_description`,`subtask`.`subtask_url` AS `subtask_url`,`subtask`.`subtask_accumulative` AS `subtask_accumulative`,`subtask`.`participant_id` AS `subtask_owner_participant_id`,`subtask`.`subtask_dividend_rate` AS `subtask_dividend_rate`,`subtask_category`.`subtask_category_name` AS `subtask_category_name`,`subtask_category`.`subtask_category_class` AS `subtask_category_class`,`subtask_category`.`subtask_category_description` AS `subtask_category_description`,((`subtask`.`subtask_task_period_demand` * (`subtask`.`task_id` - `current_task`.`task_id`)) + `subtask`.`subtask_starting_demand`) AS `contemporary_demand` from ((`lc60_current_task` `current_task` join `lc60_subtasks` `subtask` on(1)) left join `lc60_subtask_categories` `subtask_category` on((`subtask`.`subtask_category_id` = `subtask_category`.`id`))) where ((`subtask`.`subtask_visible` <> 0) and (not(`subtask`.`id` in (select `subtask_dream_super`.`subtask_id` from `lc60_subtask_dream_super` `subtask_dream_super`))));

-- --------------------------------------------------------

