Hello, help with the request please:
select * from sc84 as nom join sc319 as p on p.PARENTEXT = nom.id join sc219 as pt on p.sp327 = pt.id join _1SCONST as c on c.objid=p.id
As a result, I have about the same table
Чайник / закупочная / 08-08-2016:13-40 / 100 / Чайник / закупочная / 08-08-2016:14-40 / 150 / Чайник / закупочная / 08-09-2016:13-40 / 190 / Чайник / оптовая / 08-09-2016:18-40 / 210 / Чайник / оптовая / 08-10-2016:13-40 / 290 /
That is, goods, types of price dates and their values. Tell me, please, how to get the latest (the actual price for each type of price and each product) I tried out the options with grouping, but obviously there is not enough skill.
- nom.id - PK products
- pt.id - PK price types
- p.id - PK prices
- p.parentext - price owner
- p.sp327 - foreign key on price type
- date column is called date