sql - limit and offset on joined table -
I have 2 tables category and items , let me show it Lift and offset by Categoy ID Descending sequence with category table: When this SQL code is run return me like this but I should return it to me How can I do this? Add order by section within subquery.
a | B ----- + ----- 1 | Cat 1 2 | Cat 2 3 | Cat 3 4 | Cat 4 5 | Cat 5 6 | Cat6
SELECT c *, F.Amount, f.Item FROM item_table f LEFT JOIN (SELECT * FROM range c LIMIT 'offset.', 3) ASCF CATIID = CID Order CID DED
A | B Items ----- + ------------- 3 cat 3 | Items, items ... 2 | Cat 2 Items, items ... 1 | Cat 1 | Item, item ...
a | B Item ----- + ------------- 6 | Cat 6 Items, items ... 4 | Cat 4 Items, items ... 5 | Cat 5 | Item, item ...
SELECT c. *, F.Amount, f.Item item_table f LEFT JOIN (SELECT * FROM range by c ORDER c.id desc LIMIT). $ Offset ', 3) ASCF CATIID = CID Order ccid Ded
Comments
Post a Comment