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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:25:40+00:00 2026-05-11T16:25:40+00:00

the question is : i have a table that contains details, this table is

  • 0

the question is :
i have a table that contains details, this table is used by users when they registered or update there profile or participate in different exams.
The report I need will have some calculation like aggregate scores .
I would to as if it is better to create new table witch includes the report i need or it’s better to work on the same table.

  • 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-11T16:25:40+00:00Added an answer on May 11, 2026 at 4:25 pm

    Are you able to provide any further details? What fields are available in the table that you want to query? How do you want to display this information? On a website? For a report?

    From what you describe, you need two tables. One table (lets call is ‘users’) would contain information about each user, and the other would contain the actual exam scores (lets call this table ‘results’ ).

    Each person in the ‘user’ table has a unique ID number (I’ll call it UID) to identify them, and each score in the ‘results’ table also has the UID of person the score relates to. By including the UID of the user in the ‘results’ table you can link an infinite number of results (known as a one-to-many relationship).

    The ‘user’ table could look like this:

    userUID (UID for each person) | Name | User Details
    1 | Barack Obama | President 
    2 | George Bush | Ex-President
    

    The ‘results’ table could look like this:

    UID for each exam | userUID (UID of the person who look the test) | Score
    1 | 1 | 85
    2 | 2 | 40    
    3 | 1 | 82
    4 | 2 | 25
    

    I always like to add a UID for things like the exam because it allows you to easily find a specific exam result.

    Anyway… a query to get all of the results for Barack Obama would look like this:

    SELECT Score From 'results' WHERE userUID = 1
    

    To get results for George Bush, you just change the userUID to 2. You would obviously need to know the UID of the user (userUID) before you ran this query.

    Please note that these are VERY basic examples (involving fictional characters 😉 ). You could easily add an aggregated score field to the ‘user’ table and update that each time you add a new result to the ‘results’ table. Depending upon how your code is set up this could save you a query.

    Good luck – Hopefully this helps!

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

Sidebar

Related Questions

Another basic Rails question: I have a database table that needs to contain references
Question: I have a question that is apparently not answered by this already-asked Bash
I have a table (user) that contains user information. I have another table (userview)
So I have this website that has a search feature which searches a table
I have a table that contains partial data that is of no use to
I have a query that pulls up questions from one table and answers from
Question for YUI experts... I have a table and I've made each cell of
I have two tables (well, two relevant for this question) : Bets (holds the
I've never used the Global Temporary Tables however I have some questions how they
The responses I've got to this question have solved the problem I had in

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.