Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- `dia` AS `5922`,
- `mes` AS `5923`,
- `ano` AS `5924`,
- `dua` AS `5925[_af]`,
- `serie` AS `5926`,
- `select_5927`.`descadu1` AS `5927[_af]`,
- `select_5928`.`desctido1` AS `5928[_af]`,
- `ruc` AS `5929[_af]`,
- IF
- (
- `nombre_declarante` IS NOT NULL
- AND TRIM( `nombre_declarante` ) <> '',
- CONCAT(
- `nombre_declarante`,
- '<br><div style="text-align:center; font-size:1.2rem;"><a style="color:black;" href="https://google.com/search?q=',
- SUBSTRING_INDEX( concat( `nombre_declarante`, '|PERU' ), '|', 1 ),
- ' ',
- SUBSTRING_INDEX( concat( `nombre_declarante`, '|PERU' ), '|',- 1 ),
- '" target="_blank"><i style="color:blue; text-align:center;" class="fa fa-google" title="Haga clic para abrir enlace de Google/Click to Google"></i></a> <a style="color:black;" href="https://www.linkedin.com/search/results/companies/?keywords=',
- `nombre_declarante`,
- '" target="_blank"><i style="color:blue; text-align:center;" class="fa fa-linkedin-square" title="Haga clic para abrir enlace de Linkedin/Click to Linkedin"></i></a></div>'
- ),
- NULL
- ) AS `5930[_af]`,
- `direccion_declarante` AS `5931[_af]`,
- `departamento` AS `5932[_af]`,
- `provincia` AS `5933[_af]`,
- `distrito` AS `5934[_af]`,
- `telefono` AS `5935`,
- `fax` AS `5936`,
- `select_5938`.`descvia1` AS `5938[_af]`,
- `select_5940`.`descban1` AS `5940[_af]`,
- `select_5941`.`descpaisa1` AS `5941[_af]`,
- `select_5942`.`descpaisa1` AS `5942[_af]`,
- `select_5943`.`nompuer` AS `5943[_af]`,
- `posicion_arancelaria` AS `5944[_af]`,
- `descripcion_posicion_arancelaria` AS `5945[_af]`,
- `producto` AS `5946[_af]`,
- `descripcion_comercial_1` AS `5947[_af]`,
- `descripcion_comercial_2` AS `5948[_af]`,
- `descripcion_comercial_3` AS `5949[_af]`,
- `descripcion_comercial_4` AS `5950[_af]`,
- `nombre_producto` AS `5951[_af]`,
- `marca` AS `5952[_af]`,
- `modelo` AS `5953[_af]`,
- `caracteristicas` AS `5954[_af]`,
- `ano_fabricacion` AS `5955`,
- FORMAT( `fob_serie`, 2, 'de_DE' ) AS `5956`,
- FORMAT( `flete`, 2, 'de_DE' ) AS `5957`,
- FORMAT( `seguro`, 2, 'de_DE' ) AS `5958`,
- FORMAT( `cif`, 2, 'de_DE' ) AS `5959`,
- FORMAT( `advalorem`, 2, 'de_DE' ) AS `5960[_af]`,
- FORMAT( `igv`, 2, 'de_DE' ) AS `5961`,
- FORMAT( `ipm`, 2, 'de_DE' ) AS `5962`,
- FORMAT( `peso_neto`, 2, 'de_DE' ) AS `5963`,
- FORMAT( `peso_bruto`, 2, 'de_DE' ) AS `5964`,
- FORMAT( `cantidad`, 2, 'de_DE' ) AS `5965`,
- `select_5966`.`descun` AS `5966`,
- FORMAT( `cif_unitario`, 2, 'de_DE' ) AS `5967`,
- FORMAT( `cantidad_comercial`, 2, 'de_DE' ) AS `5968`,
- `select_5969`.`descun1` AS `5969`,
- `select_5971`.`descbul1` AS `5971[_af]`,
- FORMAT( `cantidad_bulto`, 2, 'de_DE' ) AS `5972`,
- `select_5973`.`descesme1` AS `5973[_af]`,
- IF
- (
- `nombre_proveedor` IS NOT NULL
- AND TRIM( `nombre_proveedor` ) <> '',
- CONCAT(
- `nombre_proveedor`,
- '<br><div style="text-align:center; font-size:1.2rem;"><a style="color:black;" href="https://google.com/search?q=',
- SUBSTRING_INDEX( concat( `nombre_proveedor`, '|', `pais_origen` ), '|', 1 ),
- ' ',
- SUBSTRING_INDEX( concat( `nombre_proveedor`, '|', `pais_origen` ), '|',- 1 ),
- '" target="_blank"><i style="color:blue; text-align:center;" class="fa fa-google" title="Haga clic para abrir enlace de Google/Click to Google"></i></a> <a style="color:black;" href="https://www.linkedin.com/search/results/companies/?keywords=',
- `nombre_proveedor`,
- '" target="_blank"><i style="color:blue; text-align:center;" class="fa fa-linkedin-square" title="Haga clic para abrir enlace de Linkedin/Click to Linkedin"></i></a></div>'
- ),
- NULL
- ) AS `5974[_af]`,
- `agente_aduana` AS `5937[_af]`,
- `empresa_transporte` AS `5939[_af]`,
- `select_5970`.`descalm1` AS `5970[_af]`,
- `incoterm` AS `5975[_af]`,
- `manifiesto_de_carga` AS `5976`,
- `fecha_llegada` AS `5977[_af]`,
- FORMAT( IF ( CANTIDAD > 0, FOB_SERIE / CANTIDAD, '' ), 2, 'de_DE' ) AS `5984`,
- `bl_master` AS `5979`,
- `bill_of_lading` AS `5981`,
- `fecha_embarque` AS `5983[_af]`,
- `nave` AS `5982[_af]`,
- `agente_destino` AS `5978[_af]`,
- `select_5980`.`fpago` AS `5980[_af]`
- FROM
- `pe`.`PE_DT_00_IM_2023_01` `table`
- LEFT JOIN `pe`.`list_aduana` AS `select_5927` ON ( `table`.`aduana` = `select_5927`.`cod` )
- LEFT JOIN `pe`.`list_tipo_documento` AS `select_5928` ON ( `table`.`tipo_documento` = `select_5928`.`cod` )
- LEFT JOIN `pe`.`list_via_transporte_v2` AS `select_5938` ON ( `table`.`via_transporte` = `select_5938`.`cod` )
- LEFT JOIN `pe`.`list_bancos` AS `select_5940` ON ( `table`.`entidad_financiera` = `select_5940`.`cod` )
- LEFT JOIN `pe`.`list_pais` AS `select_5941` ON ( `table`.`pais_origen` = `select_5941`.`cod` )
- LEFT JOIN `pe`.`list_pais` AS `select_5942` ON ( `table`.`pais_adquisicion` = `select_5942`.`cod` )
- LEFT JOIN `pe`.`list_puertos` AS `select_5943` ON ( `table`.`puerto_embarque_num` = `select_5943`.`cod_num` )
- LEFT JOIN `pe`.`list_unidad_clean` AS `select_5966` ON ( `table`.`unidad_medida` = `select_5966`.`cod` )
- LEFT JOIN `pe`.`list_unidad_medida_comercial` AS `select_5969` ON ( `table`.`unidad_comercial` = `select_5969`.`cod` )
- LEFT JOIN `pe`.`list_tipo_bulto` AS `select_5971` ON ( `table`.`tipo_bulto` = `select_5971`.`cod` )
- LEFT JOIN `pe`.`list_estado_mercancia` AS `select_5973` ON ( `table`.`estado_mercancia` = `select_5973`.`cod` )
- LEFT JOIN `pe`.`list_almacen` AS `select_5970` ON ( `table`.`almacen` = `select_5970`.`cod` )
- LEFT JOIN `pe`.`list_formapago` AS `select_5980` ON ( `table`.`forma_pago` = `select_5980`.`cod` )
- WHERE
- (
- `table`.`posicion_arancelaria` LIKE '4011%')
Advertisement
Advertisement