Simple query Exercise

Source: Internet
Author: User

Select* fromfruit# Query All the contents of this tableSelectIds,name fromfruit# query sequence and name these two columnsSelect* fromFruitwhereIds='k007'#查找k007信息Select* fromFruitwherePrice='2.4' andSource='Yantai'Select* fromCarwhereName like 'Audi%'Select* fromCarwhereName like 'Audi _%' Select* fromChinastateswhereAreaName like '__ Area%'#%for as long as the data contains this field to find out, _ for a position sort querySelect* fromChinastatesOrder  byAreaCodedescSelect* fromFruitOrder  byPrice,source Statistical QuerySelect Count(*) fromNationSelect Count(AreaCode) fromchinastatesSelect Max(Price) fromcar;Select min(Price) fromcar;Select avg(Price) fromcar;Select sum(Price) fromcar;Select Max(Price),min(Price),avg(Price) fromCar #如果要一起查的话只有这样分组查询SelectCode,brand,Count(*) fromCarGroup  byBrandSelectPriceCount(*),Max(Price) fromFruitGroup  byPrice Paging QuerySelect * fromCar limit3,5#跳过几条数据取几条

Simple query Exercise

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.