All Questions
8 questions
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 ...
-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 ...
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 ...
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 | ...
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 ...
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 ...
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 ...
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
+----+------------------+-------+--...