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 9270043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:16:27+00:00 2026-06-18T15:16:27+00:00

So I have the following date ID NAME MONTH COUNT 1 David December2012 500

  • 0

So I have the following date

ID       NAME       MONTH              COUNT

1        David      December2012       500

2        Rob        December2012       320

1        David      January2013        400

2        Rob        January2013        280

I am trying to make this…….

ID       Name       December2012       January2013

1        David      500                400

2        Rob        320                280

Where I get confused is how I want to keep two of the columns and just pivot the two other fields. Anyone know how I would do this.

Thank you so much for your help/time. I have never posted one of these, and responses are greatly appreciated!

  • 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-18T15:16:29+00:00Added an answer on June 18, 2026 at 3:16 pm

    Since you didn’t specify what RDBMS you are using, then you can do this:

    SELECT
      ID,
      NAME,
      MAX(CASE WHEN MONTH = 'December2012' THEN "COUNT" END) AS "December2012",
      MAX(CASE WHEN MONTH = 'January2013'  THEN "COUNT" END) AS "January2013"
    FROM Tablename
    GROUP BY ID, Name;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine I have following table: NAME DATE OTHER_CONTANT 'A' '2012-06-05' 'baz' 'A' '2012-06-04' 'bar'
I have following SQL statementL: select DATE(bla), count(*) from tableA group by DATE(bla) UNION
I have a table with the following fields: Reports (table name) Rep_Date (date) Rep_Time
So i have the following query: DoCmd.RunSQL delete * from [TABLE NAME] where month
I have following db structure in mysql. Table: Story Id Name categoryid date 1
I have the following columns: ID DATE NAME 1 2012-10-03 12:00:00 John 2 2012-10-03
I have the following model: activity_types: id, name activities: id, id_activity_type, occurrences, date (other
I have the following regex date validator but it is allowing the following date:
I have the following date as string 091020. I am using SubSonic as my
I have the following date format: 2010-04-15 23:59:59 How would I go about converting

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.