为什么我的OR子句在SQLite Studio中不起作用?

ubbxdtey  于 2022-11-15  发布在  SQLite
关注(0)|答案(1)|浏览(189)

我是SQL新手,不确定这里是否遗漏了什么,但想知道为什么我的OR子句在这里不起作用。它只返回Doja Cat的信息,而不是Olivia Rodrigo的信息

SELECT artist_name, track_name,
AVG(tempo),
AVG(danceability),
AVG(popularity),
AVG(loudness),
AVG(energy)
    FROM BIT_DB.Spotifydata
        WHERE artist_name = 'Doja Cat' OR 'Olivia Rodrigo'
GROUP BY artist_name, track_name
xe55xuns

xe55xuns1#

WHERE artist_name = 'Doja Cat' OR artist_name = 'Olivia Rodrigo'

WHERE artist_name IN('Doja Cat', 'Olivia Rodrigo')

相关问题