Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show the most 10 version #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions web/application/models/product/versionmodel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ function getBasicVersionInfo($productId,$date)
and s.product_id = $productId and
p.product_id = s.product_id
and p.product_active=1
and p.channel_active=1
and p.channel_active=1
and s.session >0
and p.version_active=1
and p.version_name=s.version_name
group by p.version_name) t
right join
left join
( select distinct pp.version_name
from ".$dwdb->dbprefix('dim_product')." pp
where pp.product_id = $productId
Expand Down Expand Up @@ -99,7 +100,24 @@ function getVersionData($fromTime,$toTime,$productid)
from ".$dwdb->dbprefix('dim_product')." pp
where pp.product_id =$productid and
pp.product_active=1 and pp.channel_active=1
and pp.version_active=1
and pp.version_active=1
and pp.version_name in (select
version_name
from
(select
sum(startusers), version_name
from
razor_sum_basic_product_version
where
date_sk in (select
date_sk
from
razor_dim_date
where
datevalue between '$fromTime' and '$toTime')
group by version_name
order by sum(startusers) desc
limit 10) rs)
group by pp.version_name) p
left join (select * from
".$dwdb->dbprefix('sum_basic_product_version')."
Expand Down Expand Up @@ -232,4 +250,4 @@ function getNewAndActiveAllCount($productId,$from,$to)

}

?>
?>