-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `satguru_crm_satish`
--

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

--
-- Structure for view `vw_meeting_visit_grid`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`Satish_D`@`%` SQL SECURITY DEFINER VIEW `vw_meeting_visit_grid`  AS SELECT `ml`.`meeting_log_id` AS `meeting_log_id`, `ml`.`geo_location_name` AS `geo_location_name`, `ml`.`user_name` AS `user_name`, `ml`.`account` AS `account_id`, `ma`.`account_name` AS `account`, `a_type`.`option_value` AS `account_type`, `l_type`.`option_value` AS `lead_type`, `sts`.`option_value` AS `account_status`, date_format(`ml`.`date`,'%m/%d/%Y') AS `date`, `ao`.`first_name` AS `owner_first_name`, `ml`.`year` AS `year`, `ml`.`month` AS `month`, `ml`.`day` AS `day`, `ml`.`meeting_outcome` AS `meeting_outcome`, `ml`.`city` AS `city`, `ml`.`address` AS `address`, date_format(`ml`.`check_in_date`,'%m/%d/%Y') AS `check_in_date`, `ml`.`check_in_time` AS `check_in_time`, `ml`.`meeting_not_held` AS `meeting_not_held`, `ml`.`check_out_address` AS `check_out_address`, date_format(`ml`.`check_out_date`,'%m/%d/%Y') AS `check_out_date`, `ml`.`check_out_time` AS `check_out_time`, `ml`.`meeting_duration` AS `meeting_duration`, `ml`.`mom_check` AS `mom_check`, `ml`.`telephonic` AS `telephonic`, `ml`.`interaction_log_id` AS `interaction_log_id`, concat(`ucb`.`first_name`,' ',`ucb`.`last_name`) AS `created_by`, concat(`uub`.`first_name`,' ',`uub`.`last_name`) AS `last_modified_by`, date_format(`ml`.`created_at`,'%m-%d-%Y') AS `created_on`, date_format(`ml`.`updated_on`,'%m-%d-%Y') AS `updated_on` FROM (((((((`meeting_logs` `ml` left join `mst_account` `ma` on((`ma`.`account_id` = `ml`.`account`))) left join `mst_dropdown_option_values` `a_type` on((`ml`.`account_type` = `a_type`.`id`))) left join `mst_dropdown_option_values` `l_type` on((`ml`.`lead_type` = `l_type`.`id`))) left join `mst_dropdown_option_values` `sts` on((`ml`.`account_status` = `sts`.`id`))) left join `mst_user` `ao` on((`ml`.`owner` = `ao`.`id`))) left join `mst_user` `ucb` on((`ml`.`created_by` = `ucb`.`id`))) left join `mst_user` `uub` on((`ml`.`last_modified_by` = `uub`.`id`))) ORDER BY `ml`.`meeting_log_id` AS `DESCdesc` ASC  ;

--
-- VIEW `vw_meeting_visit_grid`
-- Data: None
--

COMMIT;

