sql - 如何在 VSCODE 上调试 SQLite
问题描述
我正在尝试使用 SQLite 在 Vscode 上评估查询(见下文)。它返回一个错误,这不是很有帮助(见下文)。我想知道是否可以进行更深入的调试?老实说,我不确定如何开始调试。很多tks
代码:
WITH processed_users AS (
SELECT
LEFT (u.phone_country, 2) AS short_phone_country,
u.id
FROM
users u
)
SELECT
t.user_id,
t.merchant_country,
Sum (
t.amount / fx.rate / Power (10, cd.exponent)
) AS amount
FROM
transactions t
JOIN fx_rates fx ON (
fx.ccy = t.currency
AND fx.base_ccy = 'EUR'
)
JOIN currency_details cd ON cd.currency = t.currency
JOIN processed_users pu ON pu.id = t.user_id
WHERE
t.source = 'GAIA'
AND pu.short_phone_country = t.merchant_country
GROUP BY
t.user_id,
t.merchant_country
ORDER BY
amount DESC;
错误:
[5:21:43 PM][vscode-sqlite][ERROR] near "(": syntax error
解决方案
推荐阅读
- python - 从 python 连接到 sparql 端点时出现授权错误
- google-chrome-devtools - Chrome DevTools 中的“requestTime”数字是什么意思?
- neural-network - 前向传递神经网络输出值总是收敛到一个平均值
- json - 排序键后在一行中打印所有键和值
- android - TC52、Android 8.1 上的 RhoMobile:“DS8178 蓝牙扫描仪未连接......”
- c - 我在将二进制文件读入 c 中的结构数组时遇到问题
- python - pygame 未知模块 macOS
- c++ - 如何使用 CMake 交叉编译 C++ DCMTK 项目(从 Ubuntu 到 Windows)
- game-maker - Gamemaker Studio 2:我的角色在整个房间中没有正确过渡
- azure - Azure AD:我可以使用授权代码令牌从 Web 服务请求访问令牌吗?