有三张表需要通过中间表关联查询,中间表关联字段 两个关联字段数据类型不一样,需要转换一下。怎么转换。如下图(错误代码)
AR查询
正确的sql语句
如何转换成下面正确的sqlSELECT COUNT(*) FROM "report_record" LEFT JOIN "users" ON "report_record"."ident" = "users".uuid || '' LEFT JOIN "user_certs" ON
"users"."uid" = "user_certs"."uid" LEFT JOIN "room" ON "report_record"."rid" = "room"."rid"
数据类型转换?你给的语句好像也没转换吧