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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:08:45+00:00 2026-06-03T20:08:45+00:00

This past week I was given an SQL lab involving functions. My knowledge of

  • 0

This past week I was given an SQL lab involving functions. My knowledge of SQL pre-dating this lab was minimal at best and am having a hard time getting my head around a particular function.

Four tables:

enter image description here

I am to create a stored function called teamsize which returns the number of players in a given teams name for a particular year. The team name is to be supplied as a parameter passed to the function. To my knowledge a join is required but that is about all I know.

What have I tried:

enter image description here

Any help is appreciated

  • 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-03T20:08:47+00:00Added an answer on June 3, 2026 at 8:08 pm

    You need to give it a try.
    Your main table would be Team, so you have to

    select 
    from team 
    where Team1.teamID = your_parameter and Team1.year = your_year
    

    Since you don’t need details about the players, just amount, you can just join the Team1 table with playerTeam1 and count the number of records with a count function.

    If you needed the player’s details, you would need to join the other tables, but since it isn’t necessary you are fine with the only 2 tables I mentioned.

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

Sidebar

Related Questions

This past summer I was developing a basic ASP.NET/SQL Server CRUD app, and unit
I can't get past this issue I am having. Here's a simple example: class
Over this past Christmas holiday week, when the website I work on was experiencing
Okay so here's the lowdown... been working on this solution for the past week
I have been searching for this particular problem for the past week, and since
Okay, I've been trying to fix this for the past week or so, and
I've googled this problem for the past week, it's killing my peace! Please help...
I've been struggling with this for the past week and can't find a single
I've only just started using C#/VS this past week and wondered how to do
I've been looking for the past week for the answer to this question. I

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.