Skip to content
Advertisement

Tag: accounting

How can I write a Postgres (SQL) query for FIFO ‘closing stock’ inventory valuation?

Background I need to implement inventory valuation / costing using the FIFO (first-in, first-out) method. I’m running Postgres 11 running on CentOS 7. I’ve looked at, and tried, a fair number of hypotheses from SO and the wider internet (as well as searching my own print library which includes SQL Queries for Mere Mortals, PostgreSQL Up & Running, The SQL

Advertisement