Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save GrupoAlvamex/2b4b201d0d1d63ccac79752dcccf045e to your computer and use it in GitHub Desktop.

Select an option

Save GrupoAlvamex/2b4b201d0d1d63ccac79752dcccf045e to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment