# SQL ```sql= select user from enroll join user on enroll.user_id = user.id where enroll.class_id = `classid` ``` ```haskell= joinWhere1 :: EntityFieldWrapper user row1 ty -> EntityFieldWrapper user row2 ty -> Filter user row1 -> TaggedT user m [(Entity row1, Entity row2)] act = E.select $ E.from $ \(r1 `E.InnerJoin` r2) -> do E.on $ r1 E.^. f1 E.==. r2 E.^. f2 E.where_ (toSqlQuery filter1) return (r1, r2) ``` ```haskell= -- clsId <- ... enroll_users <- joinList EnrollUserId UserId (EnrollClassId ==. clsId) -- enroll_users' <- -- filterM (\enroll_user -> do -- cid' <- project EnrollClassId (fst enroll_user) -- return (cid' == clsId) -- ) enroll_users groups <- selectList notFoundJSON (groupClass' ==. clsId) ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up