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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:37:53+00:00 2026-06-16T23:37:53+00:00

I have one table named task_assignment . It has following 6 fields named as:

  • 0

I have one table named task_assignment.
It has following 6 fields named as:

testId,quesId,evaluatorId,studId and marks

Actually this table is used to store marks for each test including each evaluators marks for each students by question id wise.

I have testId=1, quesId=Q1 and studId=S1 as a input. So, i want to get the following information in the select query.ie,Both evaluators(E1,E2) marks for the given input.

The sql query don’t written more than one row for this…I want query output is :20,15 in a single row.

Please guide me to get out of this issue…

enter image description here

  • 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-16T23:37:55+00:00Added an answer on June 16, 2026 at 11:37 pm

    I think you won’t be able to get your desired output 20, 15, since there is only one record which satisfies your criteria testId = 1, quesId = Q1, studId = S1.

    But to answer your question, here’s my query:

    SELECT GROUP_CONCAT(marks)
        FROM task_assignment
        WHERE testId = 1
            AND quesId = 'Q1'
            AND studId = 'S1';
    

    I’ve tried it in SQL Fiddle.

    EDIT 1

    If you want to parse the output of the query in your C# code to store them in separate variables, you can use the Split function:

    string marks = "20, 15"; //Suppose that this value came from database
    
    int mark1 = Convert.ToInt32(marks.Split(',')[0]);
    int mark2 = Convert.ToInt32(marks.Split(',')[1]);
    

    The code is still error-prone depending on the value of the marks variable, just make sure you have validated the value.

    This might be unrelated to the question, but still to help you on your task, that’s my answer.

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

Sidebar

Related Questions

I have a database named contacts.db with a table named TABLE_NAME that has one
This is the task at hand: I have a db table named 'reports', one
I have a database table named 'student' in which there is one column named
I have one datatable. In that table I have columns named [Total Day], [Present
I Have a table in my databse that one of the columns named NumOfView
I have a calendar table in my MYSQL database with one field named datefield
I have a table with three fields, one an identity field, and I need
I have a database which has two tables. One table contains the information of
i have a leads table that has a field named referrer..which has data like
I have a table of 3-4 columns, the central one being task names that

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.