SQL列:
library(rjson)
data <- fromJSON('https://data.mo.gov/resource/nyk8-k9ti.json')
如何找到至少有2个湖泊的Fishingcourse Supervisor Lake
AAAA Martha 1
BBBB Josh 2
CCCC Evelyn 1
AAAA Josh 1
AAAA Paul 2
?不包括重复。
答案 0 :(得分:2)
一种方法是比较最小值和最大值:
select fishingcourse
from t
group by fishingcourse
having min(lake) <> max(lake);