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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:16:10+00:00 2026-05-22T22:16:10+00:00

I have scores being submitted by three users and would like to display the

  • 0

I have scores being submitted by three users and would like to display the average score to the nearest tenth’s place. Currently, I am using the query:

SELECT AVG(score) as AverageScore
FROM PoemScores
WHERE poemID = #qGetPoems.poemid#

I am able to output AverageScore, but only as a whole number using #getScore.AverageScore#. How can I output the average score in the format n.n? The database is MSSQL Server 2008.

  • 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-22T22:16:10+00:00Added an answer on May 22, 2026 at 10:16 pm

    Depending on your database engine, you probably just need to cast the score as a decimal or a float before averaging it.

    possible mysql approach:

    select CAST(
                AVG(
                    CAST(score as decimal(8,1))
                )
               as decimal(8,1)
               ) as AverageScore
    

    possible mssql approach:

     select convert(float(8,1), AVG( convert(float(8,1), score) ) ) as AverageScore
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table named scores with the columns id and score . I
I have a table in which users store scores and other information about said
I have a page that lists poem titles, average scores and lists the judges
I have a file that stores exam scores for a class of students. I
I have a MYSQL-Table which stores scores. Every time a user improves a new
I have a table of student scores. Students can take the test multiple times,
I have the following code: def input_scores(): scores = [] y = 1 for
I have a table 'results' in which the scores are stored. Its ordered by
I have the following model association: a student model and has_many scores. I need
We have a little in-house LMS with courses built in Flash. Scores are updated

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.