我有三个表,我使用内部连接从这些表中获取数据。
SELECT u.user_id, u.user_full_name, u.user_picture,
s.shop_id, s.user_id, s.shop_name,
p.product_id, p.product_name, p.product_description,
p.product_image, p.product_price, p.user_id
FROM products AS p
INNER JOIN shops AS s
ON p.user_id = s.user_id
INNER JOIN users AS u
ON s.user_id = u.user_id
//this function is used to add two or more strings
WHERE lower(p.product_name)
LIKE '%hats%'
GROUP BY s.user_id
/* query end*/
暂无答案!
目前还没有任何答案,快来回答吧!