Home > Net >  How to use querydsl's own table alias and count(*) function
How to use querydsl's own table alias and count(*) function

Time:02-10

I would like to utilize the code below for querydsl. But there is a problem.

SELECT num, name, score, (
    SELECT COUNT( * )  1
    FROM ranking
    WHERE score > t.score
) AS rank
FROM ranking AS t
ORDER BY rank ASC 
  1. In score > t.score , how do I change t.score, which is an alias for myself, into code?
  2. How do I apply count(*) in querydsl? Can I use it like count(score)?

CodePudding user response:

  •  Tags:  
  • Related