我是SQL新手。我尝试使用谷歌搜索并查看stackoverflow上的其他类似帖子,但无法在下面找到错误。
instancetype
我很感激我能得到的任何建议。
答案 0 :(得分:1)
您重复WHERE
两次,只需使用:
SELECT Principal_Balance_Amt
, Term_Nbr
FROM [ProofOfConcept].[LendingClub].[ds_Lending_Club_Loan_Portfolio_NPI]
WHERE ndayspastdue >= 30
AND ndayspastdue <= 60
答案 1 :(得分:1)
您有两个where
条款。您应该删除第二个,如:
SELECT Principal_Balance_Amt, Term_Nbr
FROM [ProofOfConcept].[LendingClub].[ds_Lending_Club_Loan_Portfolio_NPI]
WHERE ndayspastdue >= 30 AND ndayspastdue <= 60
您也可以使用between
运算符:
SELECT Principal_Balance_Amt, Term_Nbr
FROM [ProofOfConcept].[LendingClub].[ds_Lending_Club_Loan_Portfolio_NPI]
WHERE ndayspastdue BETWEEN 30 AND 60