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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:22:03+00:00 2026-05-21T07:22:03+00:00

SELECT MIN(retail) FROM books WHERE category = ‘COMPUTER’ works fine, but when I include

  • 0
SELECT MIN(retail)
FROM books
WHERE category = 'COMPUTER'

works fine, but when I include title in select like:

SELECT MIN(retail), title
FROM books
WHERE category = 'COMPUTER'

it doesn’t. Why? How to make it work?

  • 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-05-21T07:22:03+00:00Added an answer on May 21, 2026 at 7:22 am

    Rhys’s answer is correct, if that is what you mean, but you might have wanted the title(s) where retail=MIN(retail), and that wording suggests how to get that answer:

    SELECT title, retail
    FROM books
    WHERE category = 'COMPUTER'
     AND retail = (SELECT MIN(retail) FROM books WHERE category = 'COMPUTER')
    

    To reduce duplication you can use a WITH clause (if you’re using a recent version of SQL):

    ;WITH ComputerBooks AS (
      SELECT title, retail
      FROM books
      WHERE category = 'COMPUTER')
    SELECT title, retail
    FROM ComputerBooks
    WHERE retail = (SELECT MIN(retail) FROM ComputerBooks)
    

    Sample I used to confirm syntax.

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

Sidebar

Related Questions

select min(lead), max(lead) from products WHERE part_line != 90 and category = 'x' When
Query1: SELECT DISTINCT FirstOfFrequencyMHz, Min(LicenceData.distance) AS CoFX FROM [Freq List], LicenceData WHERE ((([LicenceData].class_stat) Like
I have this MySQL query that I'd like to optimize: SELECT min(`topic_id`) FROM `gallery_topics`
For this query SELECT min(date) min_date FROM order_products group by order_id min_date ignores the
SELECT events.title FROM events ORDER BY events.title DESC I'm getting the proper ordering for
I have a query as follows: WITH CTE AS ( SELECT MIN(att.Date) [minDate] FROM
Can you do somwthing like this in postresql? select min(column1, column2) as Min, max(column1,
Consider an SQL query like this SELECT Temp.rating, Temp.avgage FROM (SELECT S.rating, AVG (S.age)
UPDATE forms SET pos = (SELECT MIN(pos)-1 FROM forms) WHERE id=$id This doesn't work,
Database: MS SQL 2008 SELECT Listing.Title, Listing.MLS, Pictures.PictureTH, Pictures.Picture, Listing.ID FROM Listing INNER JOIN

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.