salix/db/routines/vn2008/views/Vehiculos_consumo.sql

20 lines
638 B
MySQL
Raw Permalink Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`Vehiculos_consumo`
AS SELECT `vc`.`id` AS `Vehiculos_consumo_id`,
`vc`.`vehicleFk` AS `Id_Vehiculo`,
`vc`.`dated` AS `fecha`,
`vc`.`km` AS `km`,
`vc`.`liters` AS `litros`,
`vc`.`price` AS `precio`,
`vc`.`adblue` AS `adblue`,
`vc`.`tolls` AS `peajes`,
`vc`.`discount` AS `descuento`,
`vc`.`silla` AS `silla`,
`vc`.`created` AS `odbc_date`,
`vc`.`others` AS `otros`,
`vc`.`fuelTypeFk` AS `fuelTypeFk`,
`vc`.`supplierFk` AS `proveedoresFk`,
`vc`.`liters100km` AS `liters100km`,
`vc`.`gasoline` AS `gasoline`
FROM `vn`.`vehicleConsumption` `vc`