hi,all:
i do not very familar with HQL, and my problem is ,now i have 2
queries
Q1: select page_url, original_category,token from media_visit_info group by
page_url, original_category,token limit 10
Q2: select original_category as code , weight from media_visit_info where
page_url='X' group by original_category,weight;
Q1 page_url value should be send to Q2 where condition ,and the two query
result should be combined like
{
url:http\\:www.baidu.com,
category:|CN10,
token:20,
categorys:
[
{code:|CN10-1-1,weight:0.5},
{code:|CN11-2-2,weight:0.1},
{code:|CN10-1-3,weight:0.02}
]
}
i do not know if it can write into one query(JOIN+SUBQUERY??) ,any one can
help?