Skip to content

Instantly share code, notes, and snippets.

View illord's full-sized avatar

Ilkka Tammela illord

View GitHub Profile
@illord
illord / keybase.md
Created November 29, 2017 08:46
keybase.md

Keybase proof

I hereby claim:

  • I am illord on github.
  • I am illord (https://keybase.io/illord) on keybase.
  • I have a public key ASAHLkYdVKAxoX-7S6jbOeBbVMW5SJUwToL77hphdGrWbQo

To claim this, I am signing this object:

@illord
illord / view.sql
Last active September 10, 2015 08:13
SELECT min(foo.id) AS id, foo.move_id, foo.location_id, foo.company_id,
foo.product_id, foo.product_categ_id, sum(foo.quantity) AS quantity,
foo.date, foo.price_unit_on_quant, foo.source
FROM ( SELECT (stock_move.id::text || '-'::text) || quant.id::text AS id,
quant.id AS quant_id, stock_move.id AS move_id,
dest_location.id AS location_id, dest_location.company_id,
stock_move.product_id,
product_template.categ_id AS product_categ_id,
quant.qty AS quantity, stock_move.date,
quant.cost AS price_unit_on_quant,