Created
May 16, 2017 12:58
-
-
Save rasy-js/6cba6650be4884aeaeb1392ff13c93ee to your computer and use it in GitHub Desktop.
inner join many tables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
`p`.`product_ean`, | |
`p`.`product_price`, | |
`v`.`name_ru-RU`, | |
`p`.`extra_field_2`, | |
`v1`.`name_ru-RU`, | |
`v2`.`name_ru-RU`, | |
`p`.`extra_field_5`, | |
`p`.`extra_field_6`, | |
`p`.`extra_field_7`, | |
`p`.`extra_field_8` | |
FROM `exl9h_jshopping_products` AS `p` | |
INNER JOIN `exl9h_jshopping_products_extra_field_values` AS `v` | |
ON `p`.`extra_field_1` = `v`.`id` | |
INNER JOIN `exl9h_jshopping_products_extra_field_values` AS `v1` | |
ON `p`.`extra_field_3` = `v1`.`id` | |
INNER JOIN `exl9h_jshopping_products_extra_field_values` AS `v2` | |
ON `p`.`extra_field_4` = `v2`.`id` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment