The document contains SQL queries using different types of joins (INNER JOIN, LEFT JOIN, RIGHT JOIN) to select data from various tables related to livestock (cat_ganado), ranches (cat_ranchos), livestock treatments (mov_tratamientos_ganado), and livestock sales (mov_detalles_venta). The queries are joining the tables on common key fields to retrieve and combine data from the different tables.
The document contains SQL queries using different types of joins (INNER JOIN, LEFT JOIN, RIGHT JOIN) to select data from various tables related to livestock (cat_ganado), ranches (cat_ranchos), livestock treatments (mov_tratamientos_ganado), and livestock sales (mov_detalles_venta). The queries are joining the tables on common key fields to retrieve and combine data from the different tables.
The document contains SQL queries using different types of joins (INNER JOIN, LEFT JOIN, RIGHT JOIN) to select data from various tables related to livestock (cat_ganado), ranches (cat_ranchos), livestock treatments (mov_tratamientos_ganado), and livestock sales (mov_detalles_venta). The queries are joining the tables on common key fields to retrieve and combine data from the different tables.
INNER JOIN select * from cat_ganado as a inner join mov_detalles_venta as b on a.k_ganado = b.k_ganado
select * from cat_ganado as a inner join mov_tratamientos_ganado as b on a.k_ganado = b.k_ganado
select * from cat_ranchos as a inner join cat_lotes_ganado as b on a.k_rancho = b.k_rancho
LEFT JOIN select * from cat_ganado as a left join mov_tratamientos_ganado as b on a.k_ganado = b.k_ganado select * from cat_ganado as a left join mov_detalles_venta as b on a.k_ganado = b.k_ganado RIGHT JOIN select * from cat_ganado as a right join mov_tratamientos_ganado as b on a.k_ganado = b.k_ganado
select * from cat_ganado as a right join mov_detalles_venta as b on a.k_ganado = b.k_ganado