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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:40:49+00:00 2026-06-02T20:40:49+00:00

I am having a simple table with 5 columns id id_user col1 col2 col3

  • 0

I am having a simple table with 5 columns

id
id_user
col1
col2
col3

how can make Linq query to select an id_user and sum up all the col1, col2, col3 integers to make an average of those 3 columns ?

Thanks

  • 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-02T20:40:51+00:00Added an answer on June 2, 2026 at 8:40 pm

    Assuming you already have your table something along these lines should do it:

    from row in table
    let avgTotal = (new [] {row.col1, row.col2, row.col3}).Average()
    select new {row.user_id, avgTotal}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i m having following type of simple sql server table Here I want to
Hey All I'm having a difficult time with a database design. As you can
Let's say i have a simple table voting with columns id(primaryKey),token(int),candidate(int),rank(int). I want to
Let's imagine that we are having cars table with such a simple structure... car_id
I am having a simple code where i want to know when does onRestoreInstanceState
I really need help on this one. I am having a simple login form
I am having a very simple requirement.I need the border on left and right
by simple I mean, having buttons: bold, italic, numbered list bullet point list indent
Having some trouble with what should be a very simple scenario. For example purposes,
Im having some problems with a simple toggle in Safari. A really annoying flickering

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.