A
A
Andrey Golubkov2016-07-03 23:08:03
SQL
Andrey Golubkov, 2016-07-03 23:08:03

How to make a request for a non-standard selection of data from 3 tables?

How to select data from tables to get something like in the picture.
9814d726e3944d3d98227278c6cafe24.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kovalsky, 2016-07-04
@Android97

At the database level, such gluing can be done only if it is known in advance which warehouses to look for (To do this, a sequential JOIN of the same table with different sklad_id is done), or if the product for which such a selection is built is known in advance (select for all warehouses by product id, then PIVOT selections).
For a spherical horse in a vacuum, in my opinion, only pandemonium at the application level is suitable.

D
Dimonchik, 2016-07-04
@dimonchik2013

1) JOIN three tables example
2) Excel pivot table pivot table example example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question