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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:09:43+00:00 2026-06-06T11:09:43+00:00

Hoe can I do following thing without using a VIEW from one Query. !–CREATE

  • 0

Hoe can I do following thing without using a VIEW from one Query.

!--CREATE THE VIEW

CREATE OR REPLACE VIEW BDGTMGR
AS
  SELECT MANAGERID,SUM(BUDGET) AS BDGT FROM 
  N_DEPT GROUP BY MANAGERID ;

!-- THEN GET RESULT FROM THE VIEW

SELECT MANAGERID FROM BDGTMGR WHERE BDGT = (select MAX(BDGT) FROM BDGTMGR);

Here N_DEPT is may original Table which has columns named DID, MANAGERID and BUDGET.

I want to get MANAGERID who controls Maximum Budget. A Manager can control more than one Department. DID is the primary key for this table.

How can I do this?

  • 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-06T11:09:45+00:00Added an answer on June 6, 2026 at 11:09 am
    select   MANAGERID,SUM(BDGT) 
    from     N_DEPT 
    group by MANAGERID 
    order by SUM(BDGT) desc limit 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hoe can I detect the main class of my application? The one, which is
I am trying to run a query that selects values from a table using
I am trying to create 3 table view cells using code (w/o nib). I
I can run redmine via webrick successfully, however with apache I get the following
flash file loads text from xml. How can hyper links be used in the
I am getting the following error when migrating to Heroku. Installing hoe (2.9.4) /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:170:in
I have this uncomplete query: update `wp_posts` set `post_content` = replace(`post_content`, 'src=/uploads/*', 'src=blog/uploads/*'); In
I have the following json-response from a script: [{title:Welkom bij Pica Plus!,url_title:welkom-bij-pica-plus,entry_id:36,channel_id:1,author_id:6,status:open,entry_date:1336650955000,edit_date:1337180757000,expiration_date:,answer_content:Beste [Leerling],\n\nWelkom bij
I am showing my MDI windows inside the main form but in one part
Hoe to get the full path of the file that saved on into sharepoint

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.