MySQL-多表查询-案例1

案例

  • 根据需求完成多表查询的SQL语句的编写
  • 将资料汇中准备好的数据的SQL脚本导入到数据库中
  • 准备数据中各表的关系如下
    • 具体代码
    • -- 分类表
      create table category(
          id int unsigned primary key auto_increment comment '主键ID',
          name varchar(20) not null unique comment '分类名称',
          type tinyint unsigned not null comment '类型 1 菜品分类 2 套餐分类',
          sort tinyint unsigned not null comment '顺序',
          status tinyint unsigned not null default 0 comment '状态 0 禁用,1 启用',
          create_time datetime not null comment '创建时间',
          update_time datetime not null comment '更新时间'
      ) comment '分类' ;
      
      -- 菜品表
      create table dish(
          id int unsigned primary key auto_increment comment '主键ID',
          name varchar(20) not null unique comment '菜品名称',
          category_id int unsigned not null comment '菜品分类ID',
          price decimal(8, 2) not null comment '菜品价格',
          image varchar(300) not null comment '菜品图片',
          description varchar(200) comment '描述信息',
          status tinyint unsigned not null default 0 comment '状态, 0 停售 1 起售',
          create_time datetime not null comment '创建时间',
          update_time datetime not null comment '更新时间'
      ) comment '菜品';
      
      -- 套餐表
      create table setmeal(
          id int unsigned primary key auto_increment comment '主键ID',
          name varchar(20) not null unique comment '套餐名称',
          category_id int unsigned not null comment '分类id',
          price decimal(8, 2) not null comment '套餐价格',
          image varchar(300) not null comment '图片',
          description varchar(200) comment '描述信息',
          status tinyint unsigned not null default 0 comment '状态 0:停用 1:启用',
          create_time datetime not null comment '创建时间',
          update_time datetime not null comment '更新时间'
      )comment '套餐' ;
      
      -- 套餐菜品关联表
      create table setmeal_dish(
          id int unsigned primary key auto_increment comment '主键ID',
          setmeal_id int unsigned not null comment '套餐id ',
          dish_id int unsigned not null comment '菜品id',
          copies tinyint unsigned not null comment '份数'
      )comment '套餐菜品中间表';
      
      -- ================================== 导入测试数据 ====================================
      -- category
      insert into category (id, type, name, sort, status, create_time, update_time) values (1, 1, '酒水饮料', 10, 1, '2022-08-09 22:09:18', '2022-08-09 22:09:18');
      insert into category (id, type, name, sort, status, create_time, update_time) values (2, 1, '传统主食', 9, 1, '2022-08-09 22:09:32', '2022-08-09 22:18:53');
      insert into category (id, type, name, sort, status, create_time, update_time) values (3, 2, '人气套餐', 12, 1, '2022-08-09 22:11:38', '2022-08-10 11:04:40');
      insert into category (id, type, name, sort, status, create_time, update_time) values (4, 2, '商务套餐', 13, 1, '2022-08-09 22:14:10', '2022-08-10 11:04:48');
      insert into category (id, type, name, sort, status, create_time, update_time) values (5, 1, '经典川菜', 6, 1, '2022-08-09 22:17:42', '2022-08-09 22:17:42');
      insert into category (id, type, name, sort, status, create_time, update_time) values (6, 1, '新鲜时蔬', 7, 1, '2022-08-09 22:18:12', '2022-08-09 22:18:28');
      insert into category (id, type, name, sort, status, create_time, update_time) values (7, 1, '汤类', 11, 1, '2022-08-10 10:51:47', '2022-08-10 10:51:47');
      
      -- dish
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (1,'王老吉', 1, 6.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/41bfcacf-7ad4-4927-8b26-df366553a94c.png', '', 1, '2022-06-09 22:40:47', '2022-06-09 22:40:47');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (2,'北冰洋', 1, 4.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/4451d4be-89a2-4939-9c69-3a87151cb979.png', '还是小时候的味道', 1, '2022-06-10 09:18:49', '2022-06-10 09:18:49');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (3,'雪花啤酒', 1, 4.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/bf8cbfc1-04d2-40e8-9826-061ee41ab87c.png', '', 1, '2022-06-10 09:22:54', '2022-06-10 09:22:54');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (4,'米饭', 2, 2.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/76752350-2121-44d2-b477-10791c23a8ec.png', '精选五常大米', 1, '2022-06-10 09:30:17', '2022-06-10 09:30:17');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (5,'馒头', 2, 1.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/475cc599-8661-4899-8f9e-121dd8ef7d02.png', '优质面粉', 1, '2022-06-10 09:34:28', '2022-06-10 09:34:28');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (6,'老坛酸菜鱼', 5, 56.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/4a9cefba-6a74-467e-9fde-6e687ea725d7.png', '原料:汤,草鱼,酸菜', 1, '2022-06-10 09:40:51', '2022-06-10 09:40:51');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (7,'经典酸菜鮰鱼', 5, 66.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/5260ff39-986c-4a97-8850-2ec8c7583efc.png', '原料:酸菜,江团,鮰鱼', 1, '2022-06-10 09:46:02', '2022-06-10 09:46:02');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (8,'蜀味水煮草鱼', 5, 38.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/a6953d5a-4c18-4b30-9319-4926ee77261f.png', '原料:草鱼,汤', 1, '2022-06-10 09:48:37', '2022-06-10 09:48:37');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (9,'清炒小油菜', 6, 18.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/3613d38e-5614-41c2-90ed-ff175bf50716.png', '原料:小油菜', 1, '2022-06-10 09:51:46', '2022-06-10 09:51:46');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (10,'蒜蓉娃娃菜', 6, 18.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/4879ed66-3860-4b28-ba14-306ac025fdec.png', '原料:蒜,娃娃菜', 1, '2022-06-10 09:53:37', '2022-06-10 09:53:37');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (11,'清炒西兰花', 6, 18.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/e9ec4ba4-4b22-4fc8-9be0-4946e6aeb937.png', '原料:西兰花', 1, '2022-06-10 09:55:44', '2022-06-10 09:55:44');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (12,'炝炒圆白菜', 6, 18.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/22f59feb-0d44-430e-a6cd-6a49f27453ca.png', '原料:圆白菜', 1, '2022-06-10 09:58:35', '2022-06-10 09:58:35');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (13,'清蒸鲈鱼', 5, 98.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/c18b5c67-3b71-466c-a75a-e63c6449f21c.png', '原料:鲈鱼', 1, '2022-06-10 10:12:28', '2022-06-10 10:12:28');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (14,'东坡肘子', 5, 138.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/a80a4b8c-c93e-4f43-ac8a-856b0d5cc451.png', '原料:猪肘棒', 1, '2022-06-10 10:24:03', '2022-06-10 10:24:03');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (15,'梅菜扣肉', 5, 58.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/6080b118-e30a-4577-aab4-45042e3f88be.png', '原料:猪肉,梅菜', 1, '2022-06-10 10:26:03', '2022-06-10 10:26:03');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (16,'剁椒鱼头', 5, 66.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/13da832f-ef2c-484d-8370-5934a1045a06.png', '原料:鲢鱼,剁椒', 1, '2022-06-10 10:28:54', '2022-06-10 10:28:54');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (17,'馋嘴牛蛙', 5, 98.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/7a55b845-1f2b-41fa-9486-76d187ee9ee1.png', '配料:鲜活牛蛙,丝瓜,黄豆芽', 1, '2022-06-10 10:37:52', '2022-06-10 10:37:52');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (18,'鸡蛋汤', 7, 4.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/c09a0ee8-9d19-428d-81b9-746221824113.png', '配料:鸡蛋,紫菜', 1, '2022-06-10 10:54:25', '2022-06-10 10:54:25');
      insert into dish (id, name, category_id, price, image, description, status, create_time, update_time) values (19,'平菇豆腐汤', 7, 6.00, 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/16d0a3d6-2253-4cfc-9b49-bf7bd9eb2ad2.png', '配料:豆腐,平菇', 1, '2022-06-10 10:55:02', '2022-06-10 10:55:02');
      
      -- setmeal
      insert into setmeal (id, category_id, name, price, status, description, image, create_time, update_time) values (1, 4, '商务套餐A', 20.00, 1, '', 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/21a5ed3a-97f6-447a-af9d-53deabfb5661.png', '2022-06-10 10:58:09', '2022-06-10 10:58:09');
      insert into setmeal (id, category_id, name, price, status, description, image, create_time, update_time) values (2, 4, '商务套餐B', 22.00, 1, '', 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/8d0075f8-9008-4390-94ca-2ca631440304.png', '2022-06-10 11:00:13', '2022-06-10 11:11:37');
      insert into setmeal (id, category_id, name, price, status, description, image, create_time, update_time) values (3, 3, '人气套餐A', 49.00, 1, '', 'https://reggie-itcast.oss-cn-beijing.aliyuncs.com/8979566b-0e17-462b-81d8-8dbace4138f4.png', '2022-06-10 11:11:23', '2022-06-10 11:11:23');
      
      -- setmeal_dish
      insert into setmeal_dish (id, setmeal_id, dish_id, copies) values (1, 1, 1, 1);
      insert into setmeal_dish (id, setmeal_id, dish_id, copies) values (2, 1, 4, 1);
      insert into setmeal_dish (id, setmeal_id, dish_id, copies) values (3, 1, 11, 1);
      insert into setmeal_dish (id, setmeal_id, dish_id, copies) values (4, 2, 2, 1);
      insert into setmeal_dish (id, setmeal_id, dish_id, copies) values (5, 2, 4, 1);
      insert into setmeal_dish (id, setmeal_id, dish_id, copies) values (6, 2, 9, 1);
      insert into setmeal_dish (id, setmeal_id, dish_id, copies) values (7, 3, 2, 1);
      insert into setmeal_dish (id, setmeal_id, dish_id, copies) values (8, 3, 6, 1);
      insert into setmeal_dish (id, setmeal_id, dish_id, copies) values (9, 3, 5, 1);
      
      
      
      

具体需求

  • 查询价格低于10元的菜品名称,价格及其菜品的分类名称
    • 具体示例代码
    • -- todo 1.查询价格低于10元的菜品名称,价格及其菜品的分类名称
      -- 涉及的表:dish、category
      -- 根据需求应该是进行内连接查询操作
      select dish.name, dish.price, category.name
      from category,
           dish
      where dish.category_id = category.id
        and dish.price < 10;
    • 使用where语句对笛卡尔积的结果进行筛选

  • 查询所有价格在10元(含)到50元(含)之间且状态为’起售‘的菜品名称,价格及其分类名称(即使菜品没有分类,也需要将菜品查询出来)
    • 具体实例代码
    • -- todo 2.查询所有价格在10元(含)到50元(含)之间且状态为’起售‘的菜品名称,价格及其分类名称(即使菜品没有分类,也需要将菜品查询出来)
      -- 涉及的表:dish、category
      -- 根据括号中的要求需要进行外连接查询,即将dish表中的菜品信息都查询出来
      select d.name, d.price, c.name
      from dish d
               left join category c on d.category_id = c.id
      where d.price between 10 and 50
        and d.status = 1;
      -- on 后面设置的为进行外连接的条件
      -- where 后面设置的是对外连接查询结果的查询条件
    • 进行外连接时,on之后设置进行外连接的条件

    • where之后设置对于外连接查询结果的查询条件

  • 查询每个分类下最贵的菜品,展示出分类的名称、最贵的菜品的价格
    • 具体实例代码
    • -- todo 3.查询每个分类下最贵的菜品,展示出分类的名称、最贵的菜品的价格
      -- 涉及的表:price,category
      select c.name, max(d.price)
      from category c,
           dish d
      where c.id = d.category_id
      group by c.name;
    • where语句在group by语句之间执行

    • 在此条SqL语句中,select语句是最后执行的

  • 查询各个分类下菜品为起售状态,并且该分类下菜品总数量大于等于3的分类名称
    • 具体实例代码
    • -- todo 4.查询各个分类下菜品为起售状态,并且该分类下菜品总数量大于等于3的分类名称
      -- 涉及的表:dish,category
      select c.name 菜品分类, count(*) 菜品数量
      from category c,
           dish d
      where c.id = d.category_id
        and d.status = 1
      group by c.name
      having count(*) >= 3;
      -- having 函数的所用范围是分组之后的各个结果
    • 在此SQL语句中,语句的执行顺序为

      • FROM:指定要查询的表或视图。
      • WHERE:对表或视图中的数据进行筛选,满足条件的行将被保留。
      • GROUP BY:按照指定的列对数据进行分组。对满足where条件的查询结果进行分组
      • HAVING:对分组后的数据进行筛选,满足条件的分组将被保留。
      • SELECT:选择要查询的列。查询的数据为满足having语句的查询结果
  • 查询出’商务套餐A‘中包含了哪些菜品(展示出套餐名称、价格、包含的菜品名称、价格、份数)
    • 具体实例代码
    • -- todo 5.查询出’商务套餐A‘中包含了哪些菜品(展示出套餐名称、价格、包含的菜品名称、价格、份数)
      -- 涉及的表:dish,setmeal,setmeal_dish
      select s.name, d.price, d.name, sd.copies
      from setmeal_dish sd,
           setmeal s,
           dish d
      where sd.dish_id = d.id
        and sd.setmeal_id = s.id
        and s.name = '商务套餐A';
      -- 多对多关系的数据表之间的联系需要通过第三张表来建立联系
    • 两表之间存在多对多的联系,需要通创建第三张表来对这两张表建立联系

  • 查询出低于菜品平均价格的菜品信息(展示出菜品名称、菜品价格)
    • 具体实例代码
    • -- todo 6.查询出低于菜品平均价格的菜品信息(展示出菜品名称、菜品价格)
      -- 涉及的表:dish
      -- a.计算所有菜品的平均价格
      select avg(price)
      from dish;
      -- b.查询低于菜品平均价格的信息
      select *
      from dish
      where price < 37.736842;
      -- 规整查询语句
      select *
      from dish
      where price < (select avg(price)
                     from dish);
      -- 考察子查询的使用
    • 子查询语句一般放在括号中

小结

  • 在编写SQL语句之前首先分析查询要求中涉及的数据表有哪些,以及这些表之间的关系

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/48015.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

华为HCIP第二节-------------------------ISIS

IS-IS&#xff08;Intermediate System to Intermediate System&#xff0c;中间系统到中间系统&#xff09;是ISO &#xff08;International Organization for Standardization&#xff0c;国际标准化组织&#xff09;为它的CLNP&#xff08;ConnectionLessNetwork Protocol&…

WGCLOUD - v3.4.7开始访问地址不用加/wgcloud了

WGCLOUD在v3.4.7版本更新中说明&#xff0c;从v3.4.7版本开始&#xff0c;访问server页面&#xff0c;不用在URL加/wgcloud了 只需要IP和端口就可以了&#xff0c;如&#xff1a;http://localhost:9999

c++网络编程

网络编程模型 c/s 模型&#xff1a;客户端服务器模型b/s 模型&#xff1a;浏览器服务器模型1.tcp网络流程 服务器流程&#xff1a; 1.创建套接字2.完善服务器网络信息结构体3.绑定服务器网络信息结构体4.让服务器处于监听状态5.accept阻塞等待客户端连接信号6.收发数据7.关闭套…

使用EasyPoi实现Excel的按模板样式导出

模板文件 1690342020350导出测试.xlsx 导出文件 如下 1&#xff0c;横向遍历 #fe 使用#fe命令可以实现集合数据的横向拓展&#xff0c;比如模板代码是 {{#fe:maths t.score}}导出的excel里面就会显示会自当前列&#xff0c;向右拓展&#xff0c;效果可参见下面的导出文件…

Retrospectives on the Embodied AI Workshop(嵌入式人工智能研讨会回顾) 论文阅读

论文信息 题目&#xff1a;Retrospectives on the Embodied AI Workshop 作者&#xff1a;Matt Deitke, Dhruv Batra, Yonatan Bisk 来源&#xff1a;arXiv 论文地址&#xff1a;https://arxiv.org/pdf/2210.06849 Abstract 我们的分析重点关注 CVPR Embodied AI Workshop 上…

【LeetCode】114.二叉树展开为链表

题目 给你二叉树的根结点 root &#xff0c;请你将它展开为一个单链表&#xff1a; 展开后的单链表应该同样使用 TreeNode &#xff0c;其中 right 子指针指向链表中下一个结点&#xff0c;而左子指针始终为 null 。展开后的单链表应该与二叉树 先序遍历 顺序相同。 示例 1&…

紫光FPGA试用--软件篇

目录 一 软件安装启动 二 如何打开IP核&#xff1f;查看/修改现有IP核参数&#xff1f; 三 如何定义引脚&#xff1f; 四 如何下载code进入FPGA? 1. 下载到FPGA芯片内&#xff1a; 2.下载到外部FLASH中 五 如何进入在线调试模式&#xff0c;调试步骤 操作步骤&#xff…

Stack

文章目录 定义分类静态栈动态栈 算法应用 定义 在静态内存当中分配的叫做栈&#xff0c;在动态内存中分配的叫做堆。 **红色椭圆圈当中的就是在栈中分配的&#xff0c;蓝色下划线的就是在堆里分配的。**栈和堆表示的是分配数据的一种方式。静态局部变量是通过压栈和出栈来分配…

Sentinel针对IP限流

改造限流策略的针对来源选项 import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;Configuration public class Senti…

每日一题——除自身以外数组的乘积

除自身以外数组的乘积 题目链接 这一题乍一看好像十分简单&#xff0c;先用一趟循环遍历所有数据&#xff0c;得到数据所有元素的乘积&#xff0c;再用一趟循环将这个乘积除以每个元素&#xff0c;这样不就得到了除自身以外数组的乘积吗&#xff1f;我们先来看看代码&#xff…

【iOS】isKindOfClass和isMemberOfClass方法

前言 这个归根结底还是在考察我们对isa走向图和类的继承的理解&#xff0c;也就是苹果官方这幅图&#xff1a; 接下来的函数调用流程请参考这张图。 1 isKindOfClass方法 1.1 objc_opt_isKindOfClass C函数 查看源码可发现&#xff0c;无论是谁调用isKindOfClass方法都会…

了解Unity编辑器之组件篇Event(七)

Event&#xff1a;用于在对象之间进行通信和交互的机制。它可以帮助你实现触发和响应特定动作或状态的逻辑一、Event System&#xff1a;用于处理 UI 事件的系统组件 First Selected 属性&#xff1a;定义了在场景加载或 UI 激活时&#xff0c;哪个 UI 元素将成为首选的选中元素…

Kotlin多平台最佳架构指南

在这篇文章中&#xff0c;我们将对 Kotlin 多平台移动端的最佳架构进行深入探讨。在2023年&#xff0c;作为 Android 开发者&#xff0c;我们会倾向于采用 MVVM 架构&#xff0c;因为它简单、灵活且易于测试。而作为 iOS 开发者&#xff0c;我们可能会选择 MVC、Viper 等架构。…

win11安装appium

node安装 node下载网址: Download | Node.js 安装后对node安装包路径进行配置 npm config set prefix “E:\nodejs\node_global” //设置全局包目录 npm config set cache “E:\nodejs\node_cache” //设置缓存目录npm config list //查看npm配置npm install -g appium //安…

Windows SMB 共享文件夹 排错指南

1 排错可能 是否系统名称为全英文格式 如果不是则 重命名 根据如下排错可能依次设置 1&#xff0c;在运行里面输入"secpol.msc"来启动本地安全设置&#xff0c;\ 然后选择本地策略–>安全选项 -->网络安全LAN 管理器身份验证级别&#xff0c;\ “安全设置”…

C#实现数字验证码

开发环境&#xff1a;VS2019&#xff0c;.NET Core 3.1&#xff0c;ASP.NET Core API 1、建立一个验证码控制器 新建两个方法Create和Check&#xff0c;Create用于创建验证码&#xff0c;Check用于验证它是否有效。 声明一个静态类变量存放列表&#xff0c;列表中存放包含令…

如何维护你的电脑:提升性能和延长使用寿命

如何维护你的电脑&#xff1a;提升性能和延长使用寿命 &#x1f607;博主简介&#xff1a;我是一名正在攻读研究生学位的人工智能专业学生&#xff0c;我可以为计算机、人工智能相关本科生和研究生提供排忧解惑的服务。如果您有任何问题或困惑&#xff0c;欢迎随时来交流哦&…

【深度学习】从现代C++中的开始:卷积

一、说明 在上一个故事中&#xff0c;我们介绍了机器学习的一些最相关的编码方面&#xff0c;例如 functional 规划、矢量化和线性代数规划。 本文&#xff0c;让我们通过使用 2D 卷积实现实际编码深度学习模型来开始我们的道路。让我们开始吧。 二、关于本系列 我们将学习如何…

【Unity实用插件篇】| A* Pathfinding Project - A*寻路插件 的使用教程

前言【Unity实用插件篇】| A*寻路插件学习使用一、A*算法 简述二、A* Pathfinding Project 介绍2.1 A* Pathfinding Project 功能2.2 相关链接2.3 标准版和Pro版区别2.4 A* Pathfinding Project Free与Navigation的对比三、快速搭建一个自己的场景测试寻路3.1 寻路场景搭建3.2 …

python绘制3D条形图

文章目录 数据导入三维条形图bar3d 数据导入 尽管在matplotlib支持在一个坐标系中绘制多组条形图&#xff0c;效果如下 其中&#xff0c;蓝色表示中国&#xff0c;橘色表示美国&#xff0c;绿色表示欧盟。从这个图就可以非常直观地看出&#xff0c;三者自2018到2022年的GDP变化…