Changeset 8751 for trunk/MagicSoft


Ignore:
Timestamp:
10/07/07 22:04:00 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/macros/plotdb.C

    r8740 r8751  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.36 2007-09-05 17:05:35 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.37 2007-10-07 21:04:00 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    414414        case kNone:
    415415        case kGroupByPrimary:
    416             query += valued;
     416            query += Form("%s AS %s", valued.Data(), valued.Data()+1);
    417417            break;
    418418        case kGroupByHour:
    419             query += Form("DATE_FORMAT(%s, '%%Y-%%m-%%d %%H:30:00') AS %s ", fPrimaryDate.Data(), valued.Data());
     419            query += Form("DATE_FORMAT(%s, '%%Y-%%m-%%d %%H:30:00') AS %s ", fPrimaryDate.Data(), valued.Data()+1);
    420420            break;
    421421        case kGroupByNight:
    422             query += Form("DATE_FORMAT(ADDDATE(%s,Interval 12 hour), '%%Y-%%m-%%d 00:00:00') AS %s ", fPrimaryDate.Data(), valued.Data());
     422            query += Form("DATE_FORMAT(ADDDATE(%s,Interval 12 hour), '%%Y-%%m-%%d 00:00:00') AS %s ", fPrimaryDate.Data(), valued.Data()+1);
    423423            break;
    424424        case kGroupByWeek:
    425             query += Form("DATE_FORMAT(ADDDATE(%s,Interval 12 hour), '%%x%%v') AS %s ", fPrimaryDate.Data(), valued.Data());
     425            query += Form("DATE_FORMAT(ADDDATE(%s,Interval 12 hour), '%%x%%v') AS %s ", fPrimaryDate.Data(), valued.Data()+1);
    426426            break;
    427427        case kGroupByMonth:
    428             query += Form("DATE_FORMAT(ADDDATE(%s,Interval 12 hour), '%%Y-%%m-15 00:00:00') AS %s ", fPrimaryDate.Data(), valued.Data());
     428            query += Form("DATE_FORMAT(ADDDATE(%s,Interval 12 hour), '%%Y-%%m-15 00:00:00') AS %s ", fPrimaryDate.Data(), valued.Data()+1);
    429429            break;
    430430        case kGroupBySeason:
    431             //query += Form("DATE_FORMAT(ADDDATE(%s,Interval 12 hour), '%%Y-%%m-15 00:00:00') AS %s ", fPrimaryDate.Data(), valued.Data());
     431            //query += Form("DATE_FORMAT(ADDDATE(%s,Interval 12 hour), '%%Y-%%m-15 00:00:00') AS %s ", fPrimaryDate.Data(), valued.Data()+1);
    432432            break;
    433433        case kGroupByYear:
    434             query += Form("DATE_FORMAT(ADDDATE(%s,Interval 12 hour), '%%Y-08-15 00:00:00') AS %s ", fPrimaryDate.Data(), valued.Data());
     434            query += Form("DATE_FORMAT(ADDDATE(%s,Interval 12 hour), '%%Y-08-15 00:00:00') AS %s ", fPrimaryDate.Data(), valued.Data()+1);
    435435            break;
    436436        }
     
    493493        if (fGroupBy!=kNone)
    494494        {
    495             query += Form("GROUP BY %s ", valued.Data());
     495            query += Form("GROUP BY %s ", valued.Data()+1);
    496496            //query += Form(" HAVING COUNT(%s)=(COUNT(*)+1)/2 ", valuev.Data());
    497497        }
    498         query += Form("ORDER BY %s ", valued.Data());
     498        query += Form("ORDER BY %s ", valued.Data()+1);
    499499
    500500
     
    521521void plotall(MPlot &plot)
    522522{
    523     //plot.SetGroupBy(MPlot::kGroupByWeek);
     523    //plot.SetGroupBy(MPlot::kGroupByNight);
    524524
    525525    plot.SetPrimaryDate("Sequences.fRunStart");
Note: See TracChangeset for help on using the changeset viewer.