Skip to content

Instantly share code, notes, and snippets.

View raeno's full-sized avatar
🚗
Travelling across Central Asia

Vlad Mikhailov raeno

🚗
Travelling across Central Asia
View GitHub Profile
select fund_sums.total, fund_products.name
from (
select sum(allocation_amount) total, fund_product_id
from transactions
where transactions.investor_id = 490
group by fund_product_id
) fund_sums
left join fund_products on fund_sums.fund_product_id = fund_products.id
@raeno
raeno / ahn
Created September 9, 2013 13:41 — forked from ik5/ahn
#!/bin/sh
### BEGIN INIT INFO
# Provides: ahn
# Required-Start: ahn daemon
# Required-Stop: ahn daemon
# chkconfig: 2345 91 60
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Adhearsion daemon