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

START TRANSACTION;



--
-- Database: `pa_trenesanas_eksamenam_1`
--

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

--
-- Stand-in structure for view `darbi_excel_full`
-- (See below for the actual view)
--
CREATE TABLE `darbi_excel_full` (
`darbi_datums` varchar(5)
,`no` varchar(10)
,`līdz` varchar(10)
,`darba_tips` varchar(50)
,`vieta` varchar(50)
,`apraksts` varchar(255)
,`darbinieks` varchar(50)
,`darba_nr` varchar(20)
,`stundas` time
,`apsekojuma_datums` date
,`cena` decimal(10,2)
,`daudzums` decimal(10,2)
,`kopa` decimal(10,2)
);

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

--
-- Structure for view `darbi_excel_full`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`potapenko_a`@`localhost` SQL SECURITY DEFINER VIEW `darbi_excel_full`  AS SELECT date_format(`d`.`datums`,'%d.%m') AS `darbi_datums`, time_format(`d`.`sakuma_laiks`,'%H:%i') AS `no`, time_format(`d`.`beigu_laiks`,'%H:%i') AS `līdz`, `dt`.`nosaukums` AS `darba_tips`, `v`.`nosaukums` AS `vieta`, `apr`.`apraksts` AS `apraksts`, `darbin`.`vards` AS `darbinieks`, `aps`.`apsekojuma_kods` AS `darba_nr`, `d`.`stundas` AS `stundas`, `aps`.`datums` AS `apsekojuma_datums`, `d`.`cena` AS `cena`, `d`.`daudzums` AS `daudzums`, `d`.`kopa` AS `kopa` FROM (((((`Darbi` `d` left join `Darba_tipi` `dt` on((`d`.`darba_tips_id` = `dt`.`id`))) left join `Vietas` `v` on((`d`.`vieta_id` = `v`.`id`))) left join `Darba_veiceji` `darbin` on((`d`.`darba_veicejs_id` = `darbin`.`id`))) left join `Apraksti` `apr` on((`d`.`apraksts_id` = `apr`.`id`))) left join `Apsekojumi` `aps` on((`d`.`apsekojums_id` = `aps`.`id`))) ;
COMMIT;

