Project

General

Profile

« Previous | Next » 

Revision 41983

Added by Eri Katsari about 8 years ago

fix for ordering on dates

View differences:

OrganizationRepo.java
1 1
/**
2
 * Created by eri_k on 2/20/2016.
2
 * Created by Glykeria Katsari on 2/20/2016.
3 3
 */
4 4
package eu.dnetlib.usagestats.repos;
5 5

  
......
55 55
    public List<UsageStats> getPopularityOverTime(String organizationId) {
56 56

  
57 57
        String query = "select os.organizationid, os.timestamp_month , os.numberofviews from usagestats.organizationsstats os " +
58
                " where os.organizationid=?  order by os.timestamp_month  desc ;";
58
                " where os.organizationid=?  order by to_date(os.timestamp_month,'MM/YYYY') ;";
59 59
        List<String> values = new ArrayList<String>();
60 60
        values.add(organizationId);
61 61
        return executePreparedQuery(query, values);

Also available in: Unified diff