I am trying to run a query with a join and the query seems to run fine (no error) in psql, but when the exact same query is entered into sqlx::query!
is fails. What am I doing wrong and where?
query:
SELECT * from nodes JOIN users on users.user_id = nodes.user_id;
sqlx:
match sqlx::query!("SELECT * from nodes JOIN users on users.user_id = nodes.user_id;")
.fetch_all(&pool)
.await
{
Ok(a) => {}
Err(e) => {}
}
Error:
error[E0124]: field `user_id` is already declared