hao to solve follow sql,example : #3122
Unanswered
baopoguicai
asked this question in
Q&A
Replies: 2 comments
-
Hey @baopoguicai 👋 holds := client.Hold.Query().
Where(
// First predicate: "id" IN subquery.
func(s *sql.Selector) {
t := sql.Table(hold.Table)
s.Where(
sql.In(
s.C(hold.FieldID),
sql.Select(t.C(hold.FieldID)).From(t).Where(...),
),
)
},
// Rest of the predicates.
hold.NFTStatus(3),
hold.Deleted(false),
).
Order(ent.Asc(hold.FieldID)).
Limit(100).
AllX(ctx) |
Beta Was this translation helpful? Give feedback.
0 replies
-
when exec sql, error=sql: expected 8277 arguments, got 139349 for above sql |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
select * from hold where id in (
select id hold where mtime > '2022-11-23 14:53:00' and mtime <'2022-11-24 14:55:02'
) and nft_status = 3 and is_deleted = 0 order by id desc limit 100;
Beta Was this translation helpful? Give feedback.
All reactions