Skip to content

Instantly share code, notes, and snippets.

View GrupoAlvamex's full-sized avatar
🏠
Working from home

Ivan Porras GrupoAlvamex

🏠
Working from home
View GitHub Profile
select am.name, length(aml.ref), aml.ref, length(aml.name), aml.name, aa.name
from account_move_line aml
inner join account_account aa ON aa.id = aml.account_id
inner join account_move am ON am.id = aml.move_id
where aml.date at time zone 'utc' between '2018-07-01 00:00:00' and '2018-07-30 23:59:59'
and (length(aml.ref) > 200 or length(aml.name) > 200)
group by aa.name, aml.name, am.name, aml.ref