Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9015537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:46:30+00:00 2026-06-16T03:46:30+00:00

select site, case when site=’AppCircle’ then (count(create_dtime)*0.4438083264) when site=’AppCircle Clips’ then (count(create_dtime)*0.0096978792) when site=’BC

  • 0
select site,
case
when site='AppCircle' then (count(create_dtime)*0.4438083264)
when site='AppCircle Clips' then (count(create_dtime)*0.0096978792)
when site='BC : SponsorPay' then (count(create_dtime)*0.9620989399)
when site='BonusCoins.com : Aarki' then (count(create_dtime)*0.4612565445)
when site='Nielsen Rewards' then (count(create_dtime)*-0.6000000000)
when site ='Portal : Paymentwall' then (count(create_dtime)*0.5433541667)
when site ='Portal : RadiumOne' then (count(create_dtime)*0.0619798753)
when site ='Portal : TrialPay' then (count(create_dtime)*2.1468159204)
when site ='bonuscp_login' then (count(create_dtime)*-0.1500000000)
when site ='facebook_like' then (count(create_dtime)*2.1468159204)
when site ='iTunes' then (count(create_dtime)*-0.0300000000)
end
From player_aux_pt
Where
Trunc(Create_Dtime) >= To_Date('2012-Nov-01','yyyy-mon-dd')
And Trunc(Create_Dtime) <= To_Date('2012-Nov-30','yyyy-mon-dd')  
group by site

which results in two columns of data

Site    [insert every case statement here]

I just want that second column of information to be named “Profit”

Site    Profit

I have tried many different ways an am stuck.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:46:31+00:00Added an answer on June 16, 2026 at 3:46 am

    Note: Since your CASE statement is just a basic DECODE pattern, check the link for a concise alternative.

    select site,
           count(create_dtime)
         * DECODE(site, 'AppCircle', 0.4438083264,
                        'AppCircle Clips', 0.0096978792,
                        'BC : SponsorPay', 0.9620989399,
                        ......) Profit
     ....
    

    You can alias columns by giving it a name after the expression or base column name, e.g.

    SELECT
        Site,
        Site ReNamedSite,
        Concat(Site,'a') "AddedAnA",
        COALESCE(Site,Address) AS "Two Words"
    ...
    

    Notes:

    1. The keyword AS is optional
    2. Usage of double quotes is optional, unless you use multiple words

    i.e.

    select site,
    case
    when site='AppCircle' then (count(create_dtime)*0.4438083264)
    when site='AppCircle Clips' then (count(create_dtime)*0.0096978792)
    when site='BC : SponsorPay' then (count(create_dtime)*0.9620989399)
    when site='BonusCoins.com : Aarki' then (count(create_dtime)*0.4612565445)
    when site='Nielsen Rewards' then (count(create_dtime)*-0.6000000000)
    when site ='Portal : Paymentwall' then (count(create_dtime)*0.5433541667)
    when site ='Portal : RadiumOne' then (count(create_dtime)*0.0619798753)
    when site ='Portal : TrialPay' then (count(create_dtime)*2.1468159204)
    when site ='bonuscp_login' then (count(create_dtime)*-0.1500000000)
    when site ='facebook_like' then (count(create_dtime)*2.1468159204)
    when site ='iTunes' then (count(create_dtime)*-0.0300000000)
    end Profit
    From player_aux_pt
    Where
    Trunc(Create_Dtime) >= To_Date('2012-Nov-01','yyyy-mon-dd')
    And Trunc(Create_Dtime) <= To_Date('2012-Nov-30','yyyy-mon-dd')  
    group by site
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have on my site a single select box that will then
Can Django admin site select entries by a custom date range, i.e. using two
I have a site with a SELECT statement like this: SELECT * FROM MyTable
I have first: select url from urls where site = '$value' order by url
I have a select-all jquery script I got from a site (I forgot the
I currently have a web site where users can select a custom theme. After
I want to develop a online karaoke site where users can select a video
In google translate web site if i type any word in English and select
team = hxs.select ('//table[@class=tablehead/tbody/tr[contains[.@class, player]') The structure of the web site I whose table
In the site I am currently working on members can favorite other members. Then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.