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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:57:28+00:00 2026-06-05T02:57:28+00:00

I am developing a training management web-based system that provides the user with short

  • 0

I am developing a training management web-based system that provides the user with short quizzes to refresh their knowledge. Anyway, I have the following database design:

Employee Table: Username, Name, DivisionCode
Divisions Table: SapCode, DivisionShortcut
Quiz Table: QuizID, Title, IsSent
Question Table: QuestionID, Question, QuizID...
UserQuiz Table: UserQuizID, QuizID, Username, Score.

I was be able to come up with a query that shows the names of all non-participants in all divisions just in the last quiz. What I want now is to show the non-participants names in all quizzes that have been sent to the users to participate in them. The results should be listed grouping by quiz title and DivisionShortcut. So how to do that?

My Query:

SELECT d.DivisionShortcut, e.Name 
FROM employee e
 join Divisions d on (e.DivisionCode = d.SapCode)
 left join (select A.QuizID, a.Username 
            from UserQuiz a join 
                 (select max(QuizID) QuizID from dbo.Quiz where IsSent=1) b
                       on a.QuizId = b.QuizID ) c
                                 on e.Username = c.Username
                                 WHERE c.QuizID is null
                                 Order By d.DivisionShortcut
  • 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-05T02:57:29+00:00Added an answer on June 5, 2026 at 2:57 am

    You can use CROSS JOIN to get all combinations of employee and Quiz, then use NOT EXISTS to eliminate all combinations that have been completed:

    SELECT  *
    FROM    Employee e
            INNER JOIN Divisions d
                ON e.DivisionCode = d.SapCode
            CROSS JOIN Quiz
    WHERE   Quiz.IsSent = 1 
    AND     NOT EXISTS
            (   SELECT  1
                FROM    UserQuiz uq
                WHERE   uq.QuizID = Quiz.QuizID
                AND     uq.UserName = e.UserName
            )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a training management web-based system which will show the management the
When developing a Web service(Hospital Management System) using Java EE, is it necessary that
I am developing a simple data to XML serializer for training purposes. Now that
I am developing an intranet web application. I am working now on the User
iam developing iPhone application that allow user to define stations near to him, so
I'm developing an application, that makes use of some REST web services. It's technical
Developing a web application that I've registered with Twitter. In this app, I might
When developing a .Net web application, if a run time error is generated, it
I´m developing a software in C# that uses static functions from a C++ .dll
When developing an ERP-like software or any other complex business system, what resources do

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.