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

  • Home
  • SEARCH
  • 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 5937427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:32:25+00:00 2026-05-22T15:32:25+00:00

I have a query SELECT date, SUM(cimpression) AS cimp, SUM(cclick) AS cclick FROM stdaily

  • 0

I have a query

SELECT date, SUM(cimpression) AS cimp, SUM(cclick) AS cclick 
FROM stdaily 
WHERE date BETWEEN :start AND :end 
AND (id = 21 AND id = 32 AND id = 12 AND id = 33)
GROUP BY date
ORDER BY date ASC;

This query needs to return only results where the id is equal to 21,32,12 and 33 but returning results not containing those specific ID’s , not sure what exactly is wrong? Any advise?

  • 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-05-22T15:32:25+00:00Added an answer on May 22, 2026 at 3:32 pm

    What I think you are looking for is:

    SELECT date,SUM(cimpression) AS cimp, SUM(cclick) AS cclick
    FROM stdaily
    WHERE date BETWEEN :start AND :end 
    AND id in (21, 32, 12, 33) 
    GROUP BY date 
    ORDER BY date ASC;
    

    This will return results, which have an id as any of those contained within the in brackets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a query select user_id,sum(hours),date, task_id from table where used_id = 'x' and
So I have a SQL Query as Follows SELECT P.Date, P.CategoryName, P.ProductName, SUM(Quantity) Quantity,
I have the following query: select column_name, count(column_name) from table group by column_name having
I have a the query: SELECT availables.bookdate AS Date, DATEDIFF(now(),availables.updated_at) as Age FROM availables
I have an SQL query : SELECT Sum(ABS([Minimum Installment])) AS SumOfMonthlyPayments FROM tblAccount INNER
I have this MySql query : SELECT forum_categories.title, forum_messages.author, forum_messages.date AS last_message FROM forum_categories
I have a query that looks like this: SELECT SUM(`georder`) AS `order`, SUM(quantity) AS
I have this query: SELECT page.id, revision.title, revision.number FROM page INNER JOIN revision ON
I have the following query: SELECT c.* FROM companies AS c JOIN users AS
I have this SQL query: SELECT * FROM IMAGES WHERE IMAGENAME in ('IMG1', 'IMG2',

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.