FAQ Database Discussion Community


Subqueries with select function in CLSQL

postgresql,common-lisp,clsql
I'm attempting to create a subquery with the clsql:select function: CL-USER> (select [books.bookid] :from [books] :where (sql-in [books.bookid] (select [bookid] :from [bookauthors] :where (sql-= [bookauthors.authorid] 120)))) ;; 2015-03-07T06:37:08 /books/ => SELECT BOOKID FROM BOOKAUTHORS WHERE (BOOKAUTHORS.AUTHORID = 120) ;; 2015-03-07T06:37:08 /books/ => SELECT BOOKS.BOOKID FROM BOOKS WHERE (BOOKS.BOOKID IN ((157)))...