X
X
XenK2016-08-08 11:14:38
MySQL
XenK, 2016-08-08 11:14:38

Select SQL field?

There are two tables orders_list and goods , linked via good_id and id . We need to get the product names for the last week ( orders_list table ), from the goods table , so that they don't repeat. How to build a query correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kovalsky, 2016-08-08
@dmitryKovalskiy

select what your need from orders_list as ol
INNER JOIN goods as g ON g.id = ol.good_id
WHERE --условие на дату
GROUP BY g.id, g.name

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question