首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >redash查询内部连接与查询

redash查询内部连接与查询
EN

Stack Overflow用户
提问于 2020-05-05 12:54:45
回答 1查看 758关注 0票数 0

我正在使用redash来显示数据,并且很难弄清楚如何只显示这个联接查询的特定图像。

问题在于我的最后一个条件,它似乎破坏了查询(AND "images"."imageable_type" = "BrandProfile")。下面是我收到的错误信息。

代码语言:javascript
运行
复制
Error running query: column "BrandProfile" does not exist LINE 31: ...s"."height" = 760 AND "images"."imageable_type" = "BrandProf... ^


SELECT "brand_profiles"."company_name",
       "users"."full_name",
       "brand_profiles"."location",
       "brand_profiles"."company_website",
       "brand_profiles"."description",
       "images"."processed_url"
FROM "brand_profiles"
INNER JOIN "users" ON "users"."id" = "brand_profiles"."user_id"
INNER JOIN "images" ON "images"."imageable_id" = "brand_profiles"."id" AND "images"."height" = 760 AND "images"."imageable_type" = "BrandProfile"
WHERE "brand_profiles"."deleted_at" IS NULL
  AND "brand_profiles"."marketplace" = true
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-05-05 13:01:39

你能试着取代"BrandProfile" with 'BrandProfile'吗?还建议阅读post When to use single quotes, double quotes, and backticks in MySQL,它解释了ANSI_QUOTES模式的行为方式。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61613671

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档