Results 1 to 3 of 3

Thread: Width_bucket

  1. #1
    Expert Member
    Join Date
    Apr 2007
    Answers
    500

    Width_bucket

    What is Width_bucket and how it is use full ?


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Width_bucket

    Width_bucket:-
    ===============
    This function groups rows of the result set into buckets,but it attempts to create equiwidth buckets.this function can work on numeric or date data type,and takes 4 parameters. A)expression that generate the buckets. B)the value used as the start of the range of bucket no 1. C)the value used as the end of the range of bucket no n. D)the number of buckets to create(n).


  3. #3
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Width_bucket

    Sample query #1 ----------------
    Code:
    select deptno,empno,sum(sal) salary,width_bucket(sum(sal),1,3000,3)sal_bucket from emp group by deptno,empno order by sal_bucket;
    sample query #2 ----------------
    Code:
    select deptno,empno,sum(sal) salary,width_bucket(sum(sal),1000,6000,3) sal_bucket from emp group by deptno,empno order by sal_bucket;



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact