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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:11:32+00:00 2026-05-12T00:11:32+00:00

My boss is asking me to code a report that has the following components:

  • 0

My boss is asking me to code a report that has the following components:

  • A pie chart of employee count by state
  • A pie chart of employee count by age bracket (10 year brackets)
  • A pie chart of employee length of service (5 year brackets)
  • A pie chart of employee Male/Female breakdown
  • A pie chart of employee count by salary band (computer generates brackets).

There may be others.

I know I can do this by writting 5 different sql statements. However it seems like this would generate 5 table scans for one report.

I could switch gears and do one table scan and analyse each record on the front end and increment counters and probably accomplish this with one-pass.

Which way would the collective wisdom at stackoverflow go on this?

Is there a way to accomplish this with the CUBE or ROLL UP clauses in T-SQL?

  • 1 1 Answer
  • 1 View
  • 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-12T00:11:33+00:00Added an answer on May 12, 2026 at 12:11 am

    If your data is properly indexed, those reports may not require any table scans at all.

    Really, for a problem like this you should code up the reports the simple way, and then see whether the performance meets the business requirements. If not, then look at optimisation strategies.

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

Sidebar

Related Questions

My boss is asking me to develop a demo application that uses log4net for
My boss has big dreams. He wants to write an application that runs on
My boss has a windows application that he wrote. It is not a Windows
my boss wants me to code an URLrewriting for, let's say http://our.domain.com/SomeText -- that
My boss has a C++ project that just began hanging today when he hits
My boss has asked for a page that will not change to have two
Let's say at your job your boss says, That system over there, which has
My boss wants me to fashion a QR code so that when the user
My boss has given a code for testing PCI express on an Altera board.
My boss has come to me and asked how to enure a file uploaded

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.