Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
81 views

SQL WHERE function filter-unexpected answer

The problem looks like this: Write an SQL query that selects the product id, year, quantity, and price for the first year of every product sold. Return the resulting table in any order. A simple ...
mmmmmm's user avatar
  • 63
-1 votes
1 answer
79 views

Is there a way to use sql functions like min as values in where clause of mysql?

i am having problem with the mysql statements... the answer is to get the name of city and length of city of min length from a table named station where ordered by alphabetically by city names i have ...
Abu's user avatar
  • 1
3 votes
2 answers
417 views

how to use min as a condition in sql query

cat use min as condition the where statement is where it breaks but i cant fix it select category, count(*) as number_of_cats from books where number_of_cats > min(number_of_cats) group by ...
mojo's user avatar
  • 59
1 vote
3 answers
3k views

Select min value with specific where filters MYSQL

I have a little trouble with my subquery. I try to only take the nearest event in a table with a min value, but I need it to be confirmed (confirmed = 1 and cancelled = 0) There's my table : uid | ...
Carlos2W's user avatar
  • 2,732
0 votes
1 answer
1k views

MySQL update query with where condition only updating one record

I have two tables: Product details - For storing product information. Product Listings - For multiple copies that may be sold by different users. I'm using this select query to gather the lowest ...
Andrew Fillary's user avatar
2 votes
3 answers
3k views

MYSQL MIN in WHERE clause

OK, so I'm working on a home theater system, and to display the list of TV series I have been selecting the first episode of the first season and displaying the associated information for just that ...
user avatar
1 vote
1 answer
579 views

mysql order by MIN() where NOT NULL

i have little bit long select, where I join many tables. What i need to do: I'm selecting lowest price with SELECT MIN(accomodation_price.price) AS price_from Everything works great till i want to ...
general666's user avatar
  • 1,039
0 votes
2 answers
191 views

How to correct this mysql_query, use the right syntax and make it work?

I've already made a question about this here. But since i didn't get answer that helped me a lot i would like to ask again. In Database [1] Table Characters +----+------------------+-------+--...
Unique Power's user avatar