How to find average when instances are grouped or categorized on multiple columns?

How to find average when instances are grouped or categorized on multiple columns?

There is a table 'Result' with following data:

There is a table 'Result' with following data:

ID   Title   Category  SubCategory  Value
1    Part-1  CatX      A            100
2    Part-1  CatX      B            0
3    Part-1  CatX      C            50
4    Part-1  CatY      A            100
5    Part-1  CatY      B            0
6    Part-1  CatY      C            100
7    Part-2  CatM      A            30
8    Part-2  CatM      B            10
9    Part-2  CatM      C            100
10   Part-2  CatN      A            50
11   Part-2  CatN      B            10
12   Part-2  CatN      C            80

And this is what I am trying to achieve:

Title   SubCategory   AvgValue
Part-1  A          100
Part-1  B          0
Part-1  C          75
Part-2  A          40
Part-2  B          10
Part-2  C          90

Each Title has 3 SubCategories and I need to display the Average Value of each SubCategory for every Title. Please Help. Answer can be a SQL server Query or Linq as I can get the Result table in a List/datatable.

c# sql sql-server entity-framework linq

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Introduction to Structured Query Language SQL pdf

SQL stands for Structured Query Language. SQL is a scripting language expected to store, control, and inquiry information put away in social databases. The main manifestation of SQL showed up in 1974, when a gathering in IBM built up the principal model of a social database. The primary business social database was discharged by Relational Software later turning out to be Oracle.

Introduction to Structured Query Language SQL pdf

SQL stands for Structured Query Language. SQL is a scripting language expected to store, control, and inquiry information put away in social databases. The main manifestation of SQL showed up in 1974, when a gathering in IBM built up the principal model of a social database. The primary business social database was discharged by Relational Software later turning out to be Oracle.

Welcome Back the T-SQL Debugger with SQL Complete – SQL Debugger

Debug SQL stored procedures and develop your SQL database project with dbForge SQL Complete, a new add-in for Visual Studio and SSMS. When you develop large chunks of T-SQL code with the help of the SQL Server Management Studio tool, it is essential to test the “Live” behavior of your code by making sure that each small piece of code works fine and being able to allocate any error message that may cause a failure within that code.

The Easy Guide on How to Use Subqueries in SQL Server

This article provides an outlook on various types of subqueries in SQL such as select or other T-SQL statements and caveats when using them.

How to Use SQL Server HierarchyID Through Easy Examples

This article is about SQL Server HierarchyID and which benefits you get from using hierarchyID instead of the usual parent/child relationships. Microsoft added this feature to represent one-to-many relationships with multiple levels in a better way.