SQL Language (MOSC)

MOSC Banner

Analytical function as argument

edited Oct 18, 2010 3:57AM in SQL Language (MOSC) 3 commentsAnswered
 Hi, I understand that analytical function cannot be used as an argument of aggregate function. But how can i achieve the following? Any workaround?

SELECT log_date, empl_code,
       sum((Lead(time_in,1,null) over(PARTITION BY log_date,empl_code ORDER BY time_in)-time_out)*24*60) in_between_time
  FROM time_logging
group by log_date, empl_code

Regards,
Sha

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center