我的查询是这样的.我尝试获取id列表的状态.
select order_number, order_status_name
from data.order_fact s
join data.order_status_dim l
on s.order_status_key = l.order_status_key
where
order_number in (1512011196169,1512011760019,1512011898493,1512011972111)
Run Code Online (Sandbox Code Playgroud)
我得到一个错误虽然说:
ERROR: operator does not exist: character varying = bigint
LINE 6: order_number in (1512011196169,1512011760019,1512011898493,1...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Run Code Online (Sandbox Code Playgroud)
你是否有任何关于我应该如何改造ID以使其发挥作用的线索?非常感谢!
我的查询需要帮助。我想添加一个 row_number 来对我的字段进行分区,但出现错误:错误:列“rn”不存在第 22 行:和 rn <= 3
你在我的查询中发现了一些奇怪的东西吗?非常感谢!
with location as
(select location, topcount
from pr.rankinglist_location
where topcount = 3
or (topcount = 10 and population_all > 150000)
or topcount = 25)
select store_displayname as restaurant_name,
street,
street_no,
zipcode,
city,
topcount,
ROW_NUMBER() OVER (PARTITION BY city
ORDER BY rposition DESC) rn,
store_id as store_id
from pr.rankinglist_store s
join
location m on m.location = s.city
where
statkey = '2015'
and
topcount = 3
and rn <= 3
group by 1, …Run Code Online (Sandbox Code Playgroud) postgresql ×2