我有下面的查询,它可以正常运行,但不知道postgresql中::
的含义和用法。
select (
select (
case when 1 > 0 then 1::float / (
select count(id) from transactions_products where transaction_id in (
select id from transactions_transactions tt
where status = 3 and fi = 355
and (invoice_date >= 1420754400)
and (invoice_date <= 1421099999)
and (tt.division_id = 107)
and (tt.department_id = 210)
) and is_vehicle = 1
)::float else 0 end)
limit 1) as f_4