Write the code you would place in the AverageButton click event on your form to call the Average query and the Highest query and display in a DifferenceLabel, the difference between the highest age of a student and the average age.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question
C sharp
Table: Student (the headers are the field names in the Students table)

StudentID
Name
Age
Gender
ProgramID
791
Stephanie Brown
19
Female
BCS
236
Shannon Dawn
25
Female
BA
618
Geoff Berg
24
Male
ARET
256
Andrew Schilling
22
Male
BSC
902
Gary Sang
23
Male
DAAD

Note: There is a StudentDataSet with a Student table, a StudentTableAdapter, a StudentBindingSource, and a StudentDataGridView control on the form.

Note: There is an Average query, named Average, that returns the average age of the student from the Student table.

Note: There is also Max query, named Highest, that returns the highest age of the student from the Student table.

Write the code you would place in the AverageButton click event on your form to call the Average query and the Highest query and display in a DifferenceLabel, the difference between the highest age of a student and the average age. 
 
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education