当前位置: 首页 > news >正文

MySQL-练习-数据介绍

文章目录

  • 一. 数据介绍
    • 1. 数据结构
    • 2. 创建数据库,数据表
    • 3. 员工表(employees)
      • 练习1
    • 4. 顾客表(customers)
      • 练习2
    • 5. 商品(products)和商品类别(categories)表
      • 练习3
    • 6. 供应商表(suppliers)
      • 练习4
    • 7. 订单和订单明细表
      • 练习5
  • 二. 数据汇总
  • 三. 使用CASE WHEN 和 GROUP BY将数据分组
  • 四. 窗口函数

一. 数据介绍

报表项目数据.sql(原始数据下载)

1. 数据结构

在这里插入图片描述
在这里插入图片描述

2. 创建数据库,数据表

3. 员工表(employees)

  • 保存员工基本信息:

    • 唯一ID (employee_id).
    • 姓,名(first_name and last_name).
    • 职务 (title).
  • 需要注意的是 reports_to这一列, 保存的是员工所对应的直属领导的员工ID (也在这张表中保存) ,此外还有其它列包括入职时间,生日… …

练习1

  • 选中employees 表的所有数据

    select * from employees
    
    employee_idlast_namefirst_nametitlebirth_datehire_dateaddresscityregionpostal_codecountryreports_to
    1DavolioNancySales Representative1968-12-082012-05-01507 - 20th Ave. E. Apt. 2ASeattleWA98122USA2
    2FullerAndrewVice President, Sales1972-02-192012-08-14908 W. Capital WayTacomaWA98401USAnull
    3SmithJohnSales Representative1983-08-302012-04-01722 Moss Bay Blvd.KirklandWA98033USA2
    4PeacockMargaretSales Representative1957-09-192013-05-034110 Old Redmond Rd.RedmondWA98052USA2
    5BuchananStevenSales Manager1975-03-042013-10-1714 Garrett HillLondonnullSW1 8JRUK2
    6SuyamaMichaelSales Representative1983-07-022013-10-17Coventry House Miner Rd.LondonnullEC2 7JRUK5
    7KingRobertSales Representative1980-05-292014-01-02Edgeham Hollow Winchester WayLondonnullRG1 9SPUK5
    8CallahanLauraInside Sales Coordinator1978-01-092014-03-054726 - 11th Ave. N.E.SeattleWA98105USA2
    9DodsworthAnneSales Representative1986-01-272014-11-157 Houndstooth Rd.LondonnullWG2 7LTUK5
    10SmithJohnSales Representative1994-08-302017-03-2122 Abbey RdLondonnullNW6 5JGUK2

4. 顾客表(customers)

  • 每一个顾客都有唯一IDcustomer_id, 顾客的ID是公司全名的缩写,用5个字母表示
  • 公司全名在 company_name 列中保存
  • contact_namecontact_title 两列代表了客户公司的联系人信息(名字和职务)
    • 除此之外还保存了顾客的地址信息和联系方式city, region, postal_code, country, fax
customer_idcompany_namecontact_namecontact_titleaddresscityregionpostal_codecountryfax
ALFKIAlfreds FutterkisteMaria AndersSales RepresentativeObere Str. 57Berlinnull12209Germany030-0076545
ANATRAna Trujillo Emparedados y heladosAna TrujilloOwnerAvda. de la Constitución 2222México D.F.null05021Mexico(5) 555-3745
ANTONAntonio Moreno TaqueríaAntonio MorenoOwnerMataderos 2312México D.F.null05023Mexiconull
AROUTAround the HornThomas HardySales Representative120 Hanover Sq.LondonnullWA1 1DPUK(171) 555-6750
BERGSBerglunds snabbköpChristina BerglundOrder AdministratorBerguvsvägen 8LuleånullS-958 22Sweden0921-12 34 67
BLAUSBlauer See DelikatessenHanna MoosSales RepresentativeForsterstr. 57Mannheimnull68306Germany0621-08924
BLONPBlondesddsl père et filsFrédérique CiteauxMarketing Manager24, place KléberStrasbourgnull67000France88.60.15.32
BOLIDBólido Comidas preparadasMartín SommerOwnerC/ Araquil, 67Madridnull28023Spain(91) 555 91 99
BONAPBon app’Laurence LebihanOwner12, rue des BouchersMarseillenull13008France91.24.45.41
BOTTMBottom-Dollar MarketsElizabeth LincolnAccounting Manager23 Tsawassen Blvd.TsawassenBCT2F 8M4Canada(604) 555-3745
BSBEVB’s BeveragesVictoria AshworthSales RepresentativeFauntleroy CircusLondonnullEC2 5NTUKnull
CACTUCactus Comidas para llevarPatricio SimpsonSales AgentCerrito 333Buenos Airesnull1010Argentina(1) 135-4892
CENTCCentro comercial MoctezumaFrancisco ChangMarketing ManagerSierras de Granada 9993México D.F.null05022Mexico(5) 555-7293
CHOPSChop-suey ChineseYang WangOwnerHauptstr. 29Bernnull3012Switzerlandnull
COMMIComércio MineiroPedro AfonsoSales AssociateAv. dos Lusíadas, 23Sao PauloSP05432-043Brazilnull
CONSHConsolidated HoldingsElizabeth BrownSales RepresentativeBerkeley Gardens 12 BreweryLondonnullWX1 6LTUK(171) 555-9199
DRACDDrachenblut DelikatessenSven OttliebOrder AdministratorWalserweg 21Aachennull52066Germany0241-059428
DUMONDu monde entierJanine LabruneOwner67, rue des Cinquante OtagesNantesnull44000France40.67.89.89
EASTCEastern ConnectionAnn DevonSales Agent35 King GeorgeLondonnullWX3 6FWUK(171) 555-3373
ERNSHErnst HandelRoland MendelSales ManagerKirchgasse 6Graznull8010Austria7675-3426
FAMIAFamilia ArquibaldoAria CruzMarketing AssistantRua Orós, 92Sao PauloSP05442-030Brazilnull
FISSAFISSA Fabrica Inter. Salchichas S.A.Diego RoelAccounting ManagerC/ Moralzarzal, 86Madridnull28034Spain(91) 555 55 93
FOLIGFolies gourmandesMartine RancéAssistant Sales Agent184, chaussée de TournaiLillenull59000France20.16.10.17
FOLKOFolk och fä HBMaria LarssonOwnerÅkergatan 24BräckenullS-844 67Swedennull
FRANKFrankenversandPeter FrankenMarketing ManagerBerliner Platz 43Münchennull80805Germany089-0877451
FRANRFrance restaurationCarine SchmittMarketing Manager54, rue RoyaleNantesnull44000France40.32.21.20
FRANSFranchi S.p.A.Paolo AccortiSales RepresentativeVia Monte Bianco 34Torinonull10100Italy011-4988261
FURIBFuria Bacalhau e Frutos do MarLino RodriguezSales ManagerJardim das rosas n. 32Lisboanull1675Portugal(1) 354-2535
GALEDGalería del gastrónomoEduardo SaavedraMarketing ManagerRambla de Cataluña, 23Barcelonanull08022Spain(93) 203 4561
GODOSGodos Cocina TípicaJosé Pedro FreyreSales ManagerC/ Romero, 33Sevillanull41101Spainnull
GOURLGourmet LanchonetesAndré FonsecaSales AssociateAv. Brasil, 442CampinasSP04876-786Brazilnull
GREALGreat Lakes Food MarketHoward SnyderMarketing Manager2732 Baker Blvd.EugeneOR97403USAnull
GROSRGROSELLA-RestauranteManuel PereiraOwner5ª Ave. Los Palos GrandesCaracasDF1081Venezuela(2) 283-3397
HANARHanari CarnesMario PontesAccounting ManagerRua do Paço, 67Rio de JaneiroRJ05454-876Brazil(21) 555-8765
HILAAHILARION-AbastosCarlos HernándezSales RepresentativeCarrera 22 con Ave. Carlos Soublette #8-35San CristóbalTáchira5022Venezuela(5) 555-1948
HUNGCHungry Coyote Import StoreYoshi LatimerSales RepresentativeCity Center Plaza 516 Main St.ElginOR97827USA(503) 555-2376
HUNGOHungry Owl All-Night GrocersPatricia McKennaSales Associate8 Johnstown RoadCorkCo. CorknullIreland2967 3333
ISLATIsland TradingHelen BennettMarketing ManagerGarden House Crowther WayCowesIsle of WightPO31 7PJUKnull
KOENEKöniglich EssenPhilip CramerSales AssociateMaubelstr. 90Brandenburgnull14776Germanynull
LACORLa corne d’abondanceDaniel ToniniSales Representative67, avenue de l’EuropeVersaillesnull78000France30.59.85.11
LAMAILa maison d’AsieAnnette RouletSales Manager1 rue Alsace-LorraineToulousenull31000France61.77.61.11
LAUGBLaughing Bacchus Wine CellarsYoshi TannamuriMarketing Assistant1900 Oak St.VancouverBCV3F 2K1Canada(604) 555-7293
LAZYKLazy K Kountry StoreJohn SteelMarketing Manager12 Orchestra TerraceWalla WallaWA99362USA(509) 555-6221
LEHMSLehmanns MarktstandRenate MessnerSales RepresentativeMagazinweg 7Frankfurt a.M.null60528Germany069-0245874
LETSSLet’s Stop N ShopJaime YorresOwner87 Polk St. Suite 5San FranciscoCA94117USAnull
LILASLILA-SupermercadoCarlos GonzálezAccounting ManagerCarrera 52 con Ave. Bolívar #65-98 Llano LargoBarquisimetoLara3508Venezuela(9) 331-7256
LINODLINO-DelicatesesFelipe IzquierdoOwnerAve. 5 de Mayo PorlamarI. de MargaritaNueva Esparta4980Venezuela(8) 34-93-93
LONEPLonesome Pine RestaurantFran WilsonSales Manager89 Chiaroscuro Rd.PortlandOR97219USA(503) 555-9646
MAGAAMagazzini Alimentari RiunitiGiovanni RovelliMarketing ManagerVia Ludovico il Moro 22Bergamonull24100Italy035-640231
MAISDMaison DeweyCatherine DeweySales AgentRue Joseph-Bens 532BruxellesnullB-1180Belgium(02) 201 24 68
MEREPMère PaillardeJean FresnièreMarketing Assistant43 rue St. LaurentMontréalQuébecH1J 1C3Canada(514) 555-8055
MORGKMorgenstern GesundkostAlexander FeuerMarketing AssistantHeerstr. 22Leipzignull04179Germanynull
NORTSNorth/SouthSimon CrowtherSales AssociateSouth House 300 QueensbridgeLondonnullSW7 1RZUK(171) 555-2530
OCEANOcéano Atlántico Ltda.Yvonne MoncadaSales AgentIng. Gustavo Moncada 8585 Piso 20-ABuenos Airesnull1010Argentina(1) 135-5535
OLDWOOld World DelicatessenRene PhillipsSales Representative2743 Bering St.AnchorageAK99508USA(907) 555-2880
OTTIKOttilies KäseladenHenriette PfalzheimOwnerMehrheimerstr. 369Kölnnull50739Germany0221-0765721
PARISParis spécialitésMarie BertrandOwner265, boulevard CharonneParisnull75012France(1) 42.34.22.77
PERICPericles Comidas clásicasGuillermo FernándezSales RepresentativeCalle Dr. Jorge Cash 321México D.F.null05033Mexico(5) 545-3745
PICCOPiccolo und mehrGeorg PippsSales ManagerGeislweg 14Salzburgnull5020Austria6562-9723
PRINIPrincesa Isabel VinhosIsabel de CastroSales RepresentativeEstrada da saúde n. 58Lisboanull1756Portugalnull
QUEDEQue DelíciaBernardo BatistaAccounting ManagerRua da Panificadora, 12Rio de JaneiroRJ02389-673Brazil(21) 555-4545
QUEENQueen CozinhaLúcia CarvalhoMarketing AssistantAlameda dos Canàrios, 891Sao PauloSP05487-020Brazilnull
QUICKQUICK-StopHorst KlossAccounting ManagerTaucherstraße 10Cunewaldenull01307Germanynull
RANCHRancho grandeSergio GutiérrezSales RepresentativeAv. del Libertador 900Buenos Airesnull1010Argentina(1) 123-5556
RATTCRattlesnake Canyon GroceryPaula WilsonAssistant Sales Representative2817 Milton Dr.AlbuquerqueNM87110USA(505) 555-3620
REGGCReggiani CaseificiMaurizio MoroniSales AssociateStrada Provinciale 124Reggio Emilianull42100Italy0522-556722
RICARRicardo AdocicadosJanete LimeiraAssistant Sales AgentAv. Copacabana, 267Rio de JaneiroRJ02389-890Brazilnull
RICSURichter SupermarktMichael HolzSales ManagerGrenzacherweg 237Genèvenull1203Switzerlandnull
ROMEYRomero y tomilloAlejandra CaminoAccounting ManagerGran Vía, 1Madridnull28001Spain(91) 745 6210
SANTGSanté GourmetJonas BergulfsenOwnerErling Skakkes gate 78Stavernnull4110Norway07-98 92 47
SAVEASave-a-lot MarketsJose PavarottiSales Representative187 Suffolk Ln.BoiseID83720USAnull
SEVESSeven Seas ImportsHari KumarSales Manager90 Wadhurst Rd.LondonnullOX15 4NBUK(171) 555-5646
SIMOBSimons bistroJytte PetersenOwnerVinbæltet 34Kobenhavnnull1734Denmark31 13 35 57
SPECDSpécialités du mondeDominique PerrierMarketing Manager25, rue LauristonParisnull75016France(1) 47.55.60.20
SPLIRSplit Rail Beer & AleArt BraunschweigerSales ManagerP.O. Box 555LanderWY82520USA(307) 555-6525
SUPRDSuprêmes délicesPascale CartrainAccounting ManagerBoulevard Tirou, 255CharleroinullB-6000Belgium(071) 23 67 22 21
THEBIThe Big CheeseLiz NixonMarketing Manager89 Jefferson Way Suite 2PortlandOR97201USAnull
THECRThe Cracker BoxLiu WongMarketing Assistant55 Grizzly Peak Rd.ButteMT59801USA(406) 555-8083
TOMSPToms SpezialitätenKarin JosephsMarketing ManagerLuisenstr. 48Münsternull44087Germany0251-035695
TORTUTortuga RestauranteMiguel Angel PaolinoOwnerAvda. Azteca 123México D.F.null05033Mexiconull
TRADHTradição HipermercadosAnabela DominguesSales RepresentativeAv. Inês de Castro, 414Sao PauloSP05634-030Brazil(11) 555-2168
TRAIHTrail’s Head Gourmet ProvisionersHelvetius NagySales Associate722 DaVinci Blvd.KirklandWA98034USA(206) 555-2174
VAFFEVaffeljernetPalle IbsenSales ManagerSmagsloget 45Århusnull8200Denmark86 22 33 44
VICTEVictuailles en stockMary SaveleySales Agent2, rue du CommerceLyonnull69004France78.32.54.87
VINETVins et alcools ChevalierPaul HenriotAccounting Manager59 rue de l’AbbayeReimsnull51100France26.47.15.11
WANDKDie Wandernde KuhRita MüllerSales RepresentativeAdenauerallee 900Stuttgartnull70563Germany0711-035428
WARTHWartian HerkkuPirkko KoskitaloAccounting ManagerTorikatu 38Oulunull90110Finland981-443655
WELLIWellington ImportadoraPaula ParenteSales ManagerRua do Mercado, 12ResendeSP08737-363Brazilnull
WHITCWhite Clover MarketsKarl JablonskiOwner305 - 14th Ave. S. Suite 3BSeattleWA98128USA(206) 555-4115
WILMKWilman KalaMatti KarttunenOwner/Marketing AssistantKeskuskatu 45Helsinkinull21240Finland90-224 8858
WOLZAWolski ZajazdZbyszek PiestrzeniewiczOwnerul. Filtrowa 68Warszawanull01-012Poland(26) 642-7012

练习2

  • 查询每个客户的 ID, company name, contact name, contact title, city, 和 country.并按照国家名字排序

    select customer_id,company_name,contact_name,contact_title,city,country from customersorder by country
    
    customer_idcompany_namecontact_namecontact_titlecitycountry
    OCEANOcéano Atlántico Ltda.Yvonne MoncadaSales AgentBuenos AiresArgentina
    CACTUCactus Comidas para llevarPatricio SimpsonSales AgentBuenos AiresArgentina
    RANCHRancho grandeSergio GutiérrezSales RepresentativeBuenos AiresArgentina
    ERNSHErnst HandelRoland MendelSales ManagerGrazAustria
    PICCOPiccolo und mehrGeorg PippsSales ManagerSalzburgAustria
    MAISDMaison DeweyCatherine DeweySales AgentBruxellesBelgium
    SUPRDSuprêmes délicesPascale CartrainAccounting ManagerCharleroiBelgium
    WELLIWellington ImportadoraPaula ParenteSales ManagerResendeBrazil
    HANARHanari CarnesMario PontesAccounting ManagerRio de JaneiroBrazil
    GOURLGourmet LanchonetesAndré FonsecaSales AssociateCampinasBrazil
    QUEDEQue DelíciaBernardo BatistaAccounting ManagerRio de JaneiroBrazil
    QUEENQueen CozinhaLúcia CarvalhoMarketing AssistantSao PauloBrazil
    COMMIComércio MineiroPedro AfonsoSales AssociateSao PauloBrazil
    TRADHTradição HipermercadosAnabela DominguesSales RepresentativeSao PauloBrazil
    FAMIAFamilia ArquibaldoAria CruzMarketing AssistantSao PauloBrazil
    RICARRicardo AdocicadosJanete LimeiraAssistant Sales AgentRio de JaneiroBrazil
    BOTTMBottom-Dollar MarketsElizabeth LincolnAccounting ManagerTsawassenCanada
    LAUGBLaughing Bacchus Wine CellarsYoshi TannamuriMarketing AssistantVancouverCanada
    MEREPMère PaillardeJean FresnièreMarketing AssistantMontréalCanada
    SIMOBSimons bistroJytte PetersenOwnerKobenhavnDenmark

5. 商品(products)和商品类别(categories)表

  • 商品表中保存了在Northwind商店中出售的商品信息
    • 每一种商品都有唯一的 product_id 和商品名字product_name.
    • 每一种商品都有一个供应商 (supplier_id)
    • 每一种商品都有一个商品类别 (category_id).
    • 每一种商品都有确定的单价 unit_price.
    • 字段 discontinued 代表商品是否缺货, false (有货) true (缺货)
  • 商品类别表 categories ,保存了所有商品的类别
    • 每个类别都有唯一的id
    • 每个类别都有自己的名称 category_name
    • 字段description 存储了类别的简短描述信息
  • 商品表中包含了 category_id 字段,所以可以使用join 将商品表中的信息与商品类别表中的信息进行关联查询

商品类别

category_idcategory_namedescription
1BeveragesSoft drinks, coffees, teas, beers, and ales
2CondimentsSweet and savory sauces, relishes, spreads, and seasonings
3ConfectionsDesserts, candies, and sweet breads
4Dairy ProductsCheeses
5Grains/CerealsBreads, crackers, pasta, and cereal
6Meat/PoultryPrepared meats
7ProduceDried fruit and bean curd
8SeafoodSeaweed and fish

产品表

product_idproduct_namesupplier_idcategory_idquantity_per_unitunit_priceunits_in_stockunits_on_orderdiscontinued
1Chai1110 boxes x 20 bags18.00390f
2Chang1124 - 12 oz bottles19.001740f
3Aniseed Syrup1212 - 550 ml bottles10.001370f
4Chef Anton’s Cajun Seasoning2248 - 6 oz jars22.00530f
5Chef Anton’s Gumbo Mix2236 boxes21.3500t
6Grandma’s Boysenberry Spread3212 - 8 oz jars25.001200f
7Uncle Bob’s Organic Dried Pears3712 - 1 lb pkgs.30.00150f
8Northwoods Cranberry Sauce3212 - 12 oz jars40.0060f
9Mishi Kobe Niku4618 - 500 g pkgs.97.00290t
10Ikura4812 - 200 ml jars31.00310f
11Queso Cabrales541 kg pkg.21.002230f
12Queso Manchego La Pastora5410 - 500 g pkgs.38.00860f
13Konbu682 kg box6.00240f
14Tofu6740 - 100 g pkgs.23.25350f
15Genen Shouyu6224 - 250 ml bottles15.50390f
16Pavlova7332 - 500 g boxes17.45290f
17Alice Mutton7620 - 1 kg tins39.0000t
18Carnarvon Tigers7816 kg pkg.62.50420f
19Teatime Chocolate Biscuits8310 boxes x 12 pieces9.20250f
20Sir Rodney’s Marmalade8330 gift boxes81.00400f
21Sir Rodney’s Scones8324 pkgs. x 4 pieces10.00340f
22Gustaf’s Knäckebröd9524 - 500 g pkgs.21.001040f
23Tunnbröd9512 - 250 g pkgs.9.00610f
24Guaraná Fantástica10112 - 355 ml cans4.50200t
25NuNuCa Nuß-Nougat-Creme11320 - 450 g glasses14.00760f
26Gumbär Gummibärchen113100 - 250 g bags31.23150f
27Schoggi Schokolade113100 - 100 g pieces43.90490f
28Rössle Sauerkraut12725 - 825 g cans45.60260t
29Thüringer Rostbratwurst12650 bags x 30 sausgs.123.7900t
30Nord-Ost Matjeshering13810 - 200 g glasses25.89100f
31Gorgonzola Telino14412 - 100 g pkgs12.50070f
32Mascarpone Fabioli14424 - 200 g pkgs.32.00940f
33Geitost164500 g2.501120f
34Sasquatch Ale16124 - 12 oz bottles14.001110f
35Steeleye Stout16124 - 12 oz bottles18.00200f
36Inlagd Sill17824 - 250 g jars19.001120f
37Gravad lax17812 - 500 g pkgs.26.001150f
38Côte de Blaye18112 - 75 cl bottles263.50170f
39Chartreuse verte181750 cc per bottle18.00690f
40Boston Crab Meat19824 - 4 oz tins18.401230f
41Jack’s New England Clam Chowder19812 - 12 oz cans9.65850f
42Singaporean Hokkien Fried Mee20532 - 1 kg pkgs.14.00260t
43Ipoh Coffee20116 - 500 g tins46.001710f
44Gula Malacca20220 - 2 kg bags19.45270f
45Rogede sild2181k pkg.9.50570f
46Spegesild2184 - 450 g glasses12.00950f
47Zaanse koeken22310 - 4 oz boxes9.50360f
48Chocolade22310 pkgs.12.751570f
49Maxilaku23324 - 50 g pkgs.20.001060f
50Valkoinen suklaa23312 - 100 g bars16.25650f
51Manjimup Dried Apples24750 - 300 g pkgs.53.00200f
52Filo Mix24516 - 2 kg boxes7.00380f
53Perth Pasties24648 pieces32.8000t
54Tourtière25616 pies7.45210f
55Pâté chinois25624 boxes x 2 pies24.001150f
56Gnocchi di nonna Alice26524 - 250 g pkgs.38.002110f
57Ravioli Angelo26524 - 250 g pkgs.19.50360f
58Escargots de Bourgogne27824 pieces13.25620f
59Raclette Courdavault2845 kg pkg.55.00790f
60Camembert Pierrot28415 - 300 g rounds34.00190f
61Sirop d’érable29224 - 500 ml bottles28.501130f
62Tarte au sucre29348 pies49.30170f
63Vegie-spread7215 - 625 g jars43.90240f
64Wimmers gute Semmelknödel12520 bags x 4 pieces33.252280f
65Louisiana Fiery Hot Pepper Sauce2232 - 8 oz bottles21.05760f
66Louisiana Hot Spiced Okra2224 - 8 oz jars17.004100f
67Laughing Lumberjack Lager16124 - 12 oz bottles14.00520f
68Scottish Longbreads8310 boxes x 8 pieces12.50610f
69Gudbrandsdalsost16410 kg pkg.36.00260f
70Outback Lager7124 - 355 ml bottles15.001510f
71Flotemysost16410 - 500 g pkgs.21.50260f
72Mozzarella di Giovanni14424 - 200 g pkgs.34.80140f
73Röd Kaviar17824 - 150 g jars15.001010f
74Longlife Tofu475 kg pkg.10.00420f
75Rhönbräu Klosterbier12124 - 0.5 l bottles7.751250f
76Lakkalikööri231500 ml18.00570f
77Original Frankfurter grüne Soße12212 boxes13.00320f

练习3

  • 查询每一个商品的product_namecategory_namequantity_per_unitunit_priceunits_in_stock 并且通过 unit_price 字段排序

    SELECTproduct_name,category_name,quantity_per_unit,unit_price,units_in_stock
    FROM products
    JOIN categoriesON products.category_id = categories.category_id
    ORDER BY unit_price;
    
    product_namecategory_namequantity_per_unitunit_priceunits_in_stock
    GeitostDairy Products500 g2.50112
    Guaraná FantásticaBeverages12 - 355 ml cans4.5020
    KonbuSeafood2 kg box6.0024
    Filo MixGrains/Cereals16 - 2 kg boxes7.0038
    TourtièreMeat/Poultry16 pies7.4521
    Rhönbräu KlosterbierBeverages24 - 0.5 l bottles7.75125
    TunnbrödGrains/Cereals12 - 250 g pkgs.9.0061
    Teatime Chocolate BiscuitsConfections10 boxes x 12 pieces9.2025
    Zaanse koekenConfections10 - 4 oz boxes9.5036
    Rogede sildSeafood1k pkg.9.505
    Jack’s New England Clam ChowderSeafood12 - 12 oz cans9.6585
    Longlife TofuProduce5 kg pkg.10.004
    Aniseed SyrupCondiments12 - 550 ml bottles10.0013
    Sir Rodney’s SconesConfections24 pkgs. x 4 pieces10.003
    SpegesildSeafood4 - 450 g glasses12.0095
    Gorgonzola TelinoDairy Products12 - 100 g pkgs12.500
    Scottish LongbreadsConfections10 boxes x 8 pieces12.506
    ChocoladeConfections10 pkgs.12.7515
    Original Frankfurter grüne SoßeCondiments12 boxes13.0032
    Escargots de BourgogneSeafood24 pieces13.2562

6. 供应商表(suppliers)

  • 供应商表与用户表类似
  • 每个供应商都有唯一ID supplier_id
  • 每个供应商都有公司名字company_name
  • 表中还记录了供应商的地址信息 addresscityregionpostal_codecountry
supplier_idcompany_nameaddresscityregionpostal_codecountry
1Exotic Liquids49 Gilbert St.LondonnullEC1 4SDUK
2New Orleans Cajun DelightsP.O. Box 78934New OrleansLA70117USA
3Grandma Kelly’s Homestead707 Oxford Rd.Ann ArborMI48104USA
4Tokyo Traders9-8 Sekimai Musashino-shiTokyonull100Japan
5Cooperativa de Quesos ‘Las Cabras’Calle del Rosal 4OviedoAsturias33007Spain
6Mayumi’s92 Setsuko Chuo-kuOsakanull545Japan
7Pavlova, Ltd.74 Rose St. Moonie PondsMelbourneVictoria3058Australia
8Specialty Biscuits, Ltd.29 King’s WayManchesternullM14 GSDUK
9PB Knäckebröd ABKaloadagatan 13GöteborgnullS-345 67Sweden
10Refrescos Americanas LTDAAv. das Americanas 12.890Sao Paulonull5442Brazil
11Heli Süßwaren GmbH & Co. KGTiergartenstraße 5Berlinnull10785Germany
12Plutzer Lebensmittelgroßmärkte AGBogenallee 51Frankfurtnull60439Germany
13Nord-Ost-Fisch Handelsgesellschaft mbHFrahmredder 112aCuxhavennull27478Germany
14Formaggi Fortini s.r.l.Viale Dante, 75Ravennanull48100Italy
15Norske MeierierHatlevegen 5Sandvikanull1320Norway
16Bigfoot Breweries3400 - 8th Avenue Suite 210BendOR97101USA
17Svensk Sjöföda ABBrovallavägen 231StockholmnullS-123 45Sweden
18Aux joyeux ecclésiastiques203, Rue des Francs-BourgeoisParisnull75004France
19New England Seafood CanneryOrder Processing Dept. 2100 Paul Revere Blvd.BostonMA02134USA
20Leka Trading471 Serangoon Loop, Suite #402Singaporenull0512Singapore
21LyngbysildLyngbysild Fiskebakken 10Lyngbynull2800Denmark
22Zaanse SnoepfabriekVerkoop Rijnweg 22Zaandamnull9999 ZZNetherlands
23Karkki OyValtakatu 12Lappeenrantanull53120Finland
24G’day, Mate170 Prince Edward Parade Hunter’s HillSydneyNSW2042Australia
25Ma Maison2960 Rue St. LaurentMontréalQuébecH1J 1C3Canada
26Pasta Buttini s.r.l.Via dei Gelsomini, 153Salernonull84100Italy
27Escargots Nouveaux22, rue H. VoironMontceaunull71300France
28Gai pâturageBat. B 3, rue des AlpesAnnecynull74000France
29Forêts d’érables148 rue ChasseurSte-HyacintheQuébecJ2S 7S8

练习4

  • 列出所有提供了4种以上不同商品的供应商列表

  • 所需字段:supplier_id, company_name, and products_count (提供的商品种类数量).

    SELECTs.supplier_id, s.company_name, COUNT(*) AS products_count
    FROM products p
    JOIN suppliers s ON p.supplier_id = s.supplier_id
    GROUP BY s.supplier_id,s.company_name
    HAVING COUNT(*) > 3;
    
    supplier_idcompany_nameproducts_count
    2New Orleans Cajun Delights4
    16Bigfoot Breweries6
    7Pavlova, Ltd.5
    12Plutzer Lebensmittelgroßmärkte AG5
    8Specialty Biscuits, Ltd.4

7. 订单和订单明细表

订单表 orders 中的每一条数据包含了一个订单的基本信息:

  • 订单ID order_id,顾客ID customer_id, 销售员的员工ID employee_id

  • 订单相关的时间信息 (下单日期order_date 和配送日期 shipped_date) 和其他配送相关信息

    • ship_via 运输方式
    • freight 运费
    • ship_address 收货地址
    • ship_city 收货城市
    • ship_region 收货地区
    • ship_postal_code 收货地址邮编
    • ship_country 收货国家

    订单表

order_idcustomer_idemployee_idorder_dateshipped_dateship_viafreightship_addressship_cityship_regionship_postal_codeship_country
10248VINET52016-07-042016-07-16332.3859 rue de l’AbbayeReimsnull51100France
10249TOMSP62016-07-052016-07-10111.61Luisenstr. 48Münsternull44087Germany
10250HANAR42016-07-082016-07-12265.83Rua do Paço, 67Rio de JaneiroRJ05454-876Brazil
10251VICTE32016-07-082016-07-15141.342, rue du CommerceLyonnull69004France
10252SUPRD42016-07-092016-07-11251.30Boulevard Tirou, 255CharleroinullB-6000Belgium
10253HANAR32016-07-102016-07-16258.17Rua do Paço, 67Rio de JaneiroRJ05454-876Brazil
10254CHOPS52016-07-112016-07-23222.98Hauptstr. 31Bernnull3012Switzerland
10255RICSU92016-07-122016-07-153148.33Starenweg 5Genèvenull1204Switzerland
10256WELLI32016-07-152016-07-17213.97Rua do Mercado, 12ResendeSP08737-363Brazil
10257HILAA102016-07-162016-07-22381.91Carrera 22 con Ave. Carlos Soublette #8-35San CristóbalTáchira5022Venezuela
10258ERNSH12016-07-172016-07-231140.51Kirchgasse 6Graznull8010Austria
10259CENTC42016-07-182016-07-2533.25Sierras de Granada 9993México D.F.null05022Mexico
10260OTTIK42016-07-192016-07-29155.09Mehrheimerstr. 369Kölnnull50739Germany
10261QUEDE42016-07-192016-07-3023.05Rua da Panificadora, 12Rio de JaneiroRJ02389-673Brazil
10262RATTC82016-07-222016-07-25348.292817 Milton Dr.AlbuquerqueNM87110USA
10263ERNSH92016-07-232016-07-313146.06Kirchgasse 6Graznull8010Austria
10264FOLKO62016-07-242016-08-2333.67Åkergatan 24BräckenullS-844 67Sweden
10265BLONP22016-07-252016-08-12155.2824, place KléberStrasbourgnull67000France
10266WARTH32016-07-262016-07-31325.73Torikatu 38Oulunull90110Finland
10267FRANK42016-07-292016-08-061208.58Berliner Platz 43Münchennull80805Germany
10268GROSR82016-07-302016-08-02366.295ª Ave. Los Palos GrandesCaracasDF1081Venezuela
10269WHITC52016-07-312016-08-0914.561029 - 12th Ave. S.SeattleWA98124USA
10270WARTH12016-08-012016-08-021136.54Torikatu 38Oulunull90110Finland
10271SPLIR62016-08-012016-08-3024.54P.O. Box 555LanderWY82520USA
10272RATTC62016-08-022016-08-06298.032817 Milton Dr.AlbuquerqueNM87110USA
10273QUICK32016-08-052016-08-12376.07Taucherstraße 10Cunewaldenull01307Germany
10274VINET62016-08-062016-08-1616.0159 rue de l’AbbayeReimsnull51100France
10275MAGAA12016-08-072016-08-09126.93Via Ludovico il Moro 22Bergamonull24100Italy
10276TORTU82016-08-082016-08-14313.84Avda. Azteca 123México D.F.null05033Mexico
10277MORGK22016-08-092016-08-133125.77Heerstr. 22Leipzignull04179Germany
10278BERGS82016-08-122016-08-16292.69Berguvsvägen 8LuleånullS-958 22Sweden
10279LEHMS82016-08-132016-08-16225.83Magazinweg 7Frankfurt a.M.null60528Germany
10280BERGS22016-08-142016-09-1218.98Berguvsvägen 8LuleånullS-958 22Sweden
10281ROMEY42016-08-142016-08-2112.94Gran Vía, 1Madridnull28001Spain
10282ROMEY42016-08-152016-08-21112.69Gran Vía, 1Madridnull28001Spain
10283LILAS32016-08-162016-08-23384.81Carrera 52 con Ave. Bolívar #65-98 Llano LargoBarquisimetoLara3508Venezuela
10284LEHMS42016-08-192016-08-27176.56Magazinweg 7Frankfurt a.M.null60528Germany
10285QUICK12016-08-202016-08-26276.83Taucherstraße 10Cunewaldenull01307Germany
10286QUICK82016-08-212016-08-303229.24Taucherstraße 10Cunewaldenull01307Germany
10287RICAR82016-08-222016-08-28312.76Av. Copacabana, 267Rio de JaneiroRJ02389-890Brazil
10288REGGC42016-08-232016-09-0317.45Strada Provinciale 124Reggio Emilianull42100Italy
10289BSBEV72016-08-262016-08-28322.77Fauntleroy CircusLondonnullEC2 5NTUK
10290COMMI82016-08-272016-09-03179.70Av. dos Lusíadas, 23Sao PauloSP05432-043Brazil
10291QUEDE62016-08-272016-09-0426.40Rua da Panificadora, 12Rio de JaneiroRJ02389-673Brazil
10292TRADH12016-08-282016-09-0221.35Av. Inês de Castro, 414Sao PauloSP05634-030Brazil
10293TORTU12016-08-292016-09-11321.18Avda. Azteca 123México D.F.null05033Mexico
10294RATTC42016-08-302016-09-052147.262817 Milton Dr.AlbuquerqueNM87110USA
10295VINET22016-09-022016-09-1021.1559 rue de l’AbbayeReimsnull51100France
10296LILAS62016-09-032016-09-1110.12Carrera 52 con Ave. Bolívar #65-98 Llano LargoBarquisimetoLara3508Venezuela
10297BLONP52016-09-042016-09-1025.7424, place KléberStrasbourgnull67000France
10298HUNGO62016-09-052016-09-112168.228 Johnstown RoadCorkCo. CorknullIreland
10299RICAR42016-09-062016-09-13229.76Av. Copacabana, 267Rio de JaneiroRJ02389-890Brazil
10300MAGAA22016-09-092016-09-18217.68Via Ludovico il Moro 22Bergamonull24100Italy
10301WANDK82016-09-092016-09-17245.08Adenauerallee 900Stuttgartnull70563Germany
10302SUPRD42016-09-102016-10-0926.27Boulevard Tirou, 255CharleroinullB-6000Belgium
10303GODOS72016-09-112016-09-182107.83C/ Romero, 33Sevillanull41101Spain
10304TORTU12016-09-122016-09-17263.79Avda. Azteca 123México D.F.null05033Mexico
10305OLDWO82016-09-132016-10-093257.622743 Bering St.AnchorageAK99508USA
10306ROMEY12016-09-162016-09-2337.56Gran Vía, 1Madridnull28001Spain
10307LONEP22016-09-172016-09-2520.5689 Chiaroscuro Rd.PortlandOR97219USA
10308ANATR72016-09-182016-09-2431.61Avda. de la Constitución 2222México D.F.null05021Mexico
10309HUNGO32016-09-192016-10-23147.308 Johnstown RoadCorkCo. CorknullIreland
10310THEBI82016-09-202016-09-27217.5289 Jefferson Way Suite 2PortlandOR97201USA
10311DUMON12016-09-202016-09-26324.6967, rue des Cinquante OtagesNantesnull44000France
10312WANDK22016-09-232016-10-03240.26Adenauerallee 900Stuttgartnull70563Germany
10313QUICK22016-09-242016-10-0421.96Taucherstraße 10Cunewaldenull01307Germany
10314RATTC12016-09-252016-10-04274.162817 Milton Dr.AlbuquerqueNM87110USA
10315ISLAT42016-09-262016-10-03241.76Garden House Crowther WayCowesIsle of WightPO31 7PJUK
10316RATTC12016-09-272016-10-083150.152817 Milton Dr.AlbuquerqueNM87110USA
10317LONEP62016-09-302016-10-10112.6989 Chiaroscuro Rd.PortlandOR97219USA
10318ISLAT82016-10-012016-10-0424.73Garden House Crowther WayCowesIsle of WightPO31 7PJUK
10319TORTU72016-10-022016-10-11364.50Avda. Azteca 123México D.F.null05033Mexico
10320WARTH52016-10-032016-10-18334.57Torikatu 38Oulunull90110Finland
10321ISLAT32016-10-032016-10-1123.43Garden House Crowther WayCowesIsle of WightPO31 7PJUK
10322PERIC72016-10-042016-10-2330.40Calle Dr. Jorge Cash 321México D.F.null05033Mexico
10323KOENE42016-10-072016-10-1414.88Maubelstr. 90Brandenburgnull14776Germany
10324SAVEA92016-10-082016-10-101214.27187 Suffolk Ln.BoiseID83720USA
10325KOENE12016-10-092016-10-14364.86Maubelstr. 90Brandenburgnull14776Germany
10326BOLID42016-10-102016-10-14277.92C/ Araquil, 67Madridnull28023Spain
10327FOLKO22016-10-112016-10-14163.36Åkergatan 24BräckenullS-844 67Sweden
10328FURIB42016-10-142016-10-17387.03Jardim das rosas n. 32Lisboanull1675Portugal
10329SPLIR42016-10-152016-10-232191.67P.O. Box 555LanderWY82520USA
10330LILAS32016-10-162016-10-28112.75Carrera 52 con Ave. Bolívar #65-98 Llano LargoBarquisimetoLara3508Venezuela
10331BONAP92016-10-162016-10-21110.1912, rue des BouchersMarseillenull13008France
10332MEREP32016-10-172016-10-21252.8443 rue St. LaurentMontréalQuébecH1J 1C3Canada
10333WARTH52016-10-182016-10-2530.59Torikatu 38Oulunull90110Finland
10334VICTE82016-10-212016-10-2828.562, rue du CommerceLyonnull69004France
10335HUNGO72016-10-222016-10-24242.118 Johnstown RoadCorkCo. CorknullIreland
10336PRINI72016-10-232016-10-25215.51Estrada da saúde n. 58Lisboanull1756Portugal
10337FRANK42016-10-242016-10-293108.26Berliner Platz 43Münchennull80805Germany
10338OLDWO42016-10-252016-10-29384.212743 Bering St.AnchorageAK99508USA
10339MEREP22016-10-282016-11-04215.6643 rue St. LaurentMontréalQuébecH1J 1C3Canada
10340BONAP12016-10-292016-11-083166.3112, rue des BouchersMarseillenull13008France
10341SIMOB72016-10-292016-11-05326.78Vinbæltet 34Kobenhavnnull1734Denmark
10342FRANK42016-10-302016-11-04254.83Berliner Platz 43Münchennull80805Germany
10343LEHMS42016-10-312016-11-061110.37Magazinweg 7Frankfurt a.M.null60528Germany
10344WHITC42016-11-012016-11-05223.291029 - 12th Ave. S.SeattleWA98124USA
10345QUICK22016-11-042016-11-112249.06Taucherstraße 10Cunewaldenull01307Germany
10346RATTC32016-11-052016-11-083142.082817 Milton Dr.AlbuquerqueNM87110USA
10347FAMIA42016-11-062016-11-0833.10Rua Orós, 92Sao PauloSP05442-030Brazil

订单明细表

  • 订单明细表order_items中的每一条记录代表了订单中的一件商品,记录了订单中每件商品的
    • 订单ID order_id
    • 商品ID product_id
    • 商品单价unit_price
    • 购买数量 quantity
    • 折扣 discount.
order_idproduct_idunit_pricequantitydiscount
102481114.00120.00
10248429.80100.00
102487234.8050.00
102491418.6090.00
102495142.40400.00
10250417.70100.00
102505142.40350.15
102506516.80150.15
102512216.8060.05
102515715.60150.05
102516516.80200.00
102522064.80400.05
10252332.00250.05
102526027.20400.00
102533110.00200.00
102533914.40420.00
102534916.00400.00
10254243.60150.15
102545519.20210.15
10254748.00210.00
10255215.20200.00
102551613.90350.00
102553615.20250.00
102555944.00300.00
102565326.20150.00
102567710.40120.00
102572735.10250.00
102573914.4060.00
102577710.40150.00
10258215.20500.20
10258517.00650.20
102583225.6060.20
10259218.00100.00
102593720.8010.00
10260417.70160.25
102605715.60500.00
102606239.40150.25
102607012.00210.25
10261218.00200.00
102613514.40200.00
10262517.00120.20
10262724.00150.00
102625630.4020.00
102631613.90600.25
10263243.60280.00
102633020.70600.25
10263748.00360.25
10264215.20350.00
10264417.70250.15
102651731.20300.00
102657012.00200.00
102661230.40120.05
102674014.70500.00
102675944.00700.15
102677614.40150.15
102682999.00100.00
102687227.8040.00
10269332.00600.05
102697227.80200.05
102703615.20300.00
102704336.80250.00
10271332.00240.00
102722064.8060.00
102723110.00400.00
102727227.80240.00
102731024.80240.05
102733110.00150.05
10273332.00200.00
102734014.70600.05
102737614.40330.05
102747117.20200.00
102747227.8070.00
10275243.60120.05
102755944.0060.05
102761024.80150.00
10276134.80100.00
102772836.40200.00
102776239.40120.00
102784415.50160.00
102785944.00150.00
102786335.1080.00
102787312.00250.00
102791731.20150.25
10280243.60120.00
102805519.20200.00
10280756.20300.00
10281197.3010.00
10281243.6060.00
102813514.4040.00
102823020.7060.00
102825715.6020.00
102831512.40200.00
10283197.30180.00
102836027.20350.00
102837227.8030.00
102842735.10150.25
102844415.50210.00
102846027.20200.25
102846711.2050.25
10285114.40450.20

练习5

提取订单编号为10250的订单详情,显示如下信息:

  • product_name, quantity, unit_priceorder_items 表)discountorder_date ,按商品名字排序

    SELECTproduct_name,quantity,order_items.unit_price,discount,order_date
    FROM order_items
    JOIN productsON order_items.product_id = products.product_id
    JOIN ordersON orders.order_id = order_items.order_id
    WHERE orders.order_id = 10250
    ORDER BY product_name;
    
    product_namequantityunit_pricediscountorder_date
    Jack’s New England Clam Chowder107.700.002016-07-08
    Louisiana Fiery Hot Pepper Sauce1516.800.152016-07-08
    Manjimup Dried Apples3542.400.152016-07-08

二. 数据汇总

三. 使用CASE WHEN 和 GROUP BY将数据分组

四. 窗口函数

相关文章:

MySQL-练习-数据介绍

文章目录 一. 数据介绍1. 数据结构2. 创建数据库,数据表3. 员工表(employees)练习1 4. 顾客表(customers)练习2 5. 商品(products)和商品类别(categories)表练习3 6. 供应商表(suppliers)练习4 7. 订单和订单明细表练习5 二. 数据汇总三. 使用CASE WHEN …...

React框架:解锁现代化Web开发的新维度

在当今前端开发领域,React 无疑是一颗璀璨的明星。React 是由 Facebook 开发的用于构建用户界面的 JavaScript 库,它在前端开发中占据着重要的地位,为开发者提供了一种高效、灵活且可维护的方式来构建复杂的用户界面。 一、React 的背景与开…...

电阻功率,限流,等效电阻

1 电阻额定功率 2 电阻限流作用 3 电阻并联等效电阻...

Qt | 开发工具(top1)

Qt Creator 跨平台、完整的集成开发环境(IDE),供应用程序开发者创建用于多个桌面、嵌入式和移动设备平台的应用程序。 Qt Linguist 一套将Qt C和Qt Quick应用程序翻译成本地语言的工具。 qmake Qt自动化构建工具,简化了不同平台的构建过程。…...

Node.js express

1. express 介绍 express 是一个基于 Node.js 平台的极简、灵活的 WEB 应用开发框架,官方网址:https://www.expressjs.com.cn/简单来说,express 是一个封装好的工具包,封装了很多功能,便于我们开发 WEB 应用&#xff…...

ios h5中在fixed元素中的input被focus时,键盘遮挡input (van-popup、van-feild)

问题描述: 前提:我使用的是vant组件库,其中一个页面中有一个van-popup组件,van-popup组件中又嵌套了一个van-field组件预期结果:当点击van-feild输入框时,键盘弹起,输入框显示在键盘上方实际结…...

springboot整合lua脚本在Redis实现商品库存扣减

1、目的 使用lua脚本,可以保证多条命令的操作原子性;同时可以减少操作IO(比如说判断redis对应数据是否小于0,小于0就重置为100,这个场景一般是取出来再判断,再存放进行,就至少存在2次IO,用lua脚…...

MySQL ON DUPLICATE KEY UPDATE影响行数

目录 分析为什么Updates返回7 总结 数据库更新日志如下 insertOrUpdateList|> Preparing: INSERT INTO clue_user_tag (vuid, tag_id, tag_type, content) VALUES (?, ?, ?, ?) , (?, ?, ?, ?) , (?, ?, ?, ?) , (?, ?, ?, ?) ON DUPLICATE KEY UPDATE …...

uniapp小程序 slot中无法传递外部参数的解决方案

最近在封装一个List组件&#xff0c;外部传给我数据&#xff0c;我循环后将每个Item部分slot到外部&#xff0c;由调用者自己去写item布局&#xff0c;类似ElementUI、iView的Tabe列表。 List: <view v-if"list.length > 0" class"list-scroll__item&quo…...

umi实现动态获取菜单权限

文章目录 前景登录组件编写登录逻辑菜单的时机动态路由页面刷新手动修改地址 前景 不同用户拥有不同的菜单权限&#xff0c;现在我们实现登录动态获取权限菜单。 登录组件编写 //当我们需要使用dva的dispatch函数时&#xff0c;除了通过connect函数包裹组件还可以使用这种方…...

Pytest-Bdd-Playwright 系列教程(14):Docstring 参数

Pytest-Bdd-Playwright 系列教程&#xff08;14&#xff09;&#xff1a;Docstring 参数 前言一、什么是docstring?二、基本语法三、主要特点四、实际例子五、注意事项六、使用建议总结 前言 在自动化测试的过程中&#xff0c;我们经常需要处理复杂的测试数据或需要输入多行文…...

交互开发---测量工具(适用VTK或OpenGL开发的应用程序)

简介&#xff1a; 经常使用RadiAnt DICOM Viewer来查看DICOM数据&#xff0c;该软件中的测量工具比较好用&#xff0c;就想着仿照其交互方式自己实现下。后采用VTK开发应用程序时&#xff0c;经常需要开发各种各样的测量工具&#xff0c;如果沿用VTK的widgets的思路&#xff0c…...

Qt 一个简单的QChart 绘图

Qt 一个简单的QChart 绘图 先上程序运行结果图&#xff1a; “sample9_1QChart.h” 文件代码如下&#xff1a; #pragma once#include <QtWidgets/QMainWindow> #include "ui_sample9_1QChart.h"#include <QtCharts> //必须这么设置 QT_CHARTS_USE_NAME…...

【Java笔记】LinkedList 底层结构

一、LinkedList 的全面说明 LinkedList底层实现了双向链表和双端队列特点可以添加任意元素(元素可以重复)&#xff0c;包括null线程不安全&#xff0c;没有实现同步 二、LinkedList 的底层操作机制 三、LinkedList的增删改查案例 public class LinkedListCRUD { public stati…...

el-table组件树形数据修改展开箭头

<style lang"scss" scoped> ::v-deep .el-table__expand-icon .el-icon-arrow-right:before {content: ">"; // 箭头样式font-size: 16px; }::v-deep .el-table__expand-icon{ // 没有展开的状态background-color: rgba(241, 242, 245, 1);color:…...

太速科技-FMC154-基于FMC 八路SFP+万兆光纤子卡

FMC154-基于FMC 八路SFP万兆光纤子卡 一、板卡概述 本卡是一个FPGA夹层卡&#xff08;FMC&#xff09;模块&#xff0c;可提供高达8个SFP / SFP 模块接口&#xff0c;直接插入千兆位级收发器&#xff08;MGT&#xff09;的赛灵思FPGA。支持业界标准的小型可插拔&#xff0…...

记:排查设备web时慢时快问题,速度提升100%

问题描述 问题1&#xff1a; 发现web登录界面刷新和登录功能都比较卡&#xff0c;开浏览器控制台看了下&#xff0c;让我很惊讶&#xff0c;居然能这么慢&#xff1a; 公司2个局域网内的表现不同&#xff0c;局域网A中的都比较卡&#xff0c;局域网B中的又不存在该现象。 问…...

音视频入门基础:MPEG2-TS专题(13)——FFmpeg源码中,解析Section Header的实现

一、引言 在《音视频入门基础&#xff1a;MPEG2-TS专题&#xff08;11&#xff09;—— TS中的Section》中讲述了Section Header的基本概念&#xff0c;本文讲述FFmpeg源码中是怎样解析Section Header的。 二、parse_section_header函数的定义 FFmpeg源码中通过parse_section…...

根据PDF模板单个PDF导出到浏览器和多个PDF打包ZIP导出到浏览器

一、单个PDF导出到浏览器 /*** * param templatePath 模板路径* param fileName 文件名称* param data 填充文本* param images 填充图片* param response* throws IOException*/public static void generateTempPDF(String templatePath, String fileName, Map<String, S…...

如何创建一个基本的Spring Boot应用程序

以下是一个简单的Spring Boot应用开发代码示例&#xff0c;它展示了如何创建一个基本的Spring Boot应用程序&#xff0c;并实现一个简单的RESTful API服务。 步骤1&#xff1a;创建项目 使用Spring Initializr或您喜欢的IDE&#xff08;如IntelliJ IDEA或Eclipse&#xff09;…...

1.2 计算机网络的分类和应用(重要知识点)

1.2.1 计算机网络的分类 计算机网络的定义&#xff1a; 由通信线路互相连接的、能自主工作的计算机构成&#xff0c;强调各计算机&#xff08;工作站&#xff09;拥有独立的计算资源和任务能力。与多终端分时系统不同&#xff0c;后者终端仅作为主机接口&#xff0c;不具备计…...

@JsonSerialize失效解决

当在实体类中加入这个注解时&#xff0c;本意是想如果是空值则返回0给页面&#xff0c;但是发现使用 JsonSerialize(using BigSerializer.class)无效&#xff0c;因为如果是null值会不走序列化的接口实现类&#xff0c;需要使用nullUsing 需要这样使用...

Docker部署WebRTC-Streamer

文章目录 WebRTC-Streamer概述Docker部署WebRTC-StreamerVue使用WebRTC-Streamer一些问题 WebRTC-Streamer概述 WebRTC-Streamer是一个基于WebRTC技术的流媒体传输工具&#xff0c;它可以通过Web浏览器实现实时音视频流的传输和播放。它提供了一种简单而强大的方式&#xff…...

2025年的大模型计划重点在于跨领域智能、工作流自动化、多模态能力强化

明年的计划和大模型发展方向可以围绕以下几个方面展开&#xff0c;结合实际应用场景和技术趋势&#xff0c;明确可执行的目标和期待的成果&#xff1a; 2025 年计划与展望&#xff1a;大模型能做些什么&#xff1f; 1. 更深层次的跨领域能力融合 目标&#xff1a;构建更强的跨…...

day12 接口测试 ——入门→精通→实战(1)

【没有所谓的运气&#x1f36c;&#xff0c;只有绝对的努力✊】 目录 1、接口测试分类 1.1 内部接口&#xff1a; 1.2 外部接口&#xff1a; 2、目前接口架构设计 2.1、基于SOAP架构&#xff0c; 2.2、基于RPC架构&#xff0c; 2.3、基于RestFul架构&#xff0c; 2.3.1…...

伏羲0.07(文生图)

为了使0.06代码能够有效运行并输出项目目录及所有文件&#xff0c;我们在代码中添加一些额外的功能。 项目目录结构 项目目录结构如下&#xff1a; text_to_image_project/ │ ├── config.yaml ├── data/ │ ├── train_data.csv │ └── test_data.txt ├── mod…...

scala的泛型特质的应用场景

//泛型特质的应用场景 //作比较找出最大值 //定义一个函数&#xff0c;用来求List元素中的最大值参考代码&#xff1a;object Test4 {def getMax[T](list:List[T])(implicit ev:T > Ordered[T]): T {list.reduce((a:T,b:T)> if(a>b) a else b)}def main(args: Array…...

Win10环境vscode+latex+中文快速配置

安装vscodelatex workshop 配置&#xff1a; {"liveServer.settings.donotVerifyTags": true,"liveServer.settings.donotShowInfoMsg": true,"explorer.confirmDelete": false,"files.autoSave": "afterDelay","exp…...

【vue2】el-select,虚拟滚动(vue-virtual-scroller)

需求背景​​​​​​ vue2+element-ui项目中,当el-select中数据量较大时(超出5000个dom节点),会导致页面加载和渲染卡顿、el-select下拉列表延迟展开。 在现在的el-select的基础上使用分页或者虚拟列表的形式去处理大量的下拉菜单,可以保证页面的正常渲染及el-select的…...

【ETCD】[源码阅读]深度解析 EtcdServer 的 processInternalRaftRequestOnce 方法

在分布式系统中&#xff0c;etcd 的一致性与高效性得益于其强大的 Raft 协议模块。而 processInternalRaftRequestOnce 是 etcd 服务器处理内部 Raft 请求的核心方法之一。本文将从源码角度解析这个方法的逻辑流程&#xff0c;帮助读者更好地理解 etcd 的内部实现。 方法源码 …...

互联网网站seo优化/广州网站设计制作

Rsync安装配置昨天由于部门研发同事要做个小项目&#xff0c;要我提供一份rsync的安装配置文档&#xff0c;就简单了写了份&#xff0c;顺便发出来了。1&#xff0c; 测试环境&#xff1a;CentOS release 5.8 2.6.18-308.el5 x86_64IP_S: 192.168.104.137IP_C: 192.168.…...

wordpress 做网站/网推公司干什么的

2016年6月6日&#xff0c; 加州讯&#xff0c;世界领先的高性能计算、数据中心端到端互连方案提供商Mellanox&#xff08;纳斯达克交易所代码: MLNX&#xff09;今天宣布&#xff0c;正式推出针对网络及存储应用的BlueField 系列SoC可编程芯片。该系列产品能够满足业界日益增长…...

一元购物网站怎么做/关于新品牌的营销策划

导LEAD语感谢关注matlab爱好者公众号&#xff01;如果公众号文章对您有帮助&#xff0c;别忘了点击分享和“在看”哦&#xff01;若您对公众号有什么意见或建议&#xff0c;请在公众号中回复或在任意文章底部留言&#xff01;本文作者&#xff1a;过冷水优化算法的讲解姗姗来迟…...

淘宝 做网站空间 条件/牛推网

接上一节&#xff0c;增加数据库身份认证 1、修改Config配置文件auth-enabled为true 2、然后重新载入最新的config配置文件打开数据库 3、验证身份认证功能是否已打开 说明身份认证功能已打开 4、创建admin管理员用户 CREATE USER admin WITH PASSWORD sa_123 WITH ALL PRIVILE…...

网店设计流程/win7系统优化软件

1、数组式队列 特点&#xff1a;先进先出 利用数组实现的对列 #include<stdio.h>#define MAXSIZE 10 //队列大小int buf[MAXSIZE]; int tail0; int front0;//队列是否为空 bool IsEmpty() {if(tailfront)//当头尾相等时表示队列为空return true;elsereturn false; } /…...

贵州 跨境电商网站建设/最近新闻头条最新消息

1、在项目src文件夹下&#xff0c;创建一个pages文件夹&#xff0c;用来新建多页面的各个入口文件 &#xff08;1&#xff09;配置index页面&#xff0c;文件写在src/pages/index文件夹下&#xff0c;在浏览器中访问地址http://localhost:8090/index.html#/&#xff1a; src/…...