sqlite - SQLite3 Query - Incorrect output -


i running 1 specific query on database in sqlite3 , giving me wrong output.

the question posed myself to:

find total number of itemid's of auctions highest current price.

the answer 1,046,871,451, 300k more that.

there tables/relations:

  • item (itemid, name, currently, buy_price, first_bid, number_of_bids, started, ends, userid, description)

  • user (userid, rating, location, country)

  • category (itemid, category)

  • bid (itemid, userid, time, amount)

this attempt:

select itemid item in (select max(currently) item); 

i @ lost , input query. many in advance.

edit note: = current price of item.

edit 2: 2nd attempt

select itemid item  in (select distinct max(currently) item group itemid); 


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -