我在报告信息和构建视图时遇到问题我的表信息如下
数据库
表stu
---------------------------------------------------
----------------------< Stu >----------------------
---------------------------------------------------
| id | name | age|id_Orientation | id_StudyStatus|
---------------------------------------------------
| 1 | John | 24 | 1 | 1 |
| 2 | Sara | 23 | 1 | 2 |
| 3 | Mary | 26 | 1 | 3 |
| 4 | Jax | 25 | 2 | 1 |
| 5 | izable| 22 | 2 | 2 |
| 6 | Tari | 23 | 2 | 3 |
| 7 | Kap | 26 | 3 | 1 |
| 8 | Lio | 25 | 3 | 2 |
| 9 | Soti | 22 | 3 | 3 |
---------------------------------------------------
表studystatus
-----------------
--<StudyStatus>--
-----------------
| id | name |
-----------------
| 1 | Studying |
| 2 | Cancel |
| 3 |laying off|
-----------------
工作台方向
-------------------
---<Orientation>---
-------------------
| id | name |
-------------------
| 1 | IT |
| 2 |Construction|
| 3 | Medical |
-------------------
[我最终想要的输出]
----------------------------------------------------------
----------------------< Stu >------------------------------
-----------------------------------------------------------
| id | name | All | Studying | Cancel | layingOff |
---------------------------------------------------
| 1 | IT | 3 | 1 | 1 | 1 |
| 2 |Construction| 3 | 1 | 1 | 1 |
| 3 | Medical | 3 | 1 | 1 | 1 |
-----------------------------------------------------------
通过什么查询?
请帮忙!谢谢
3条答案
按热度按时间vh0rcniy1#
试试看。但是首先从学习状态的名称中删除左右侧的空白区域。
rm5edbpk2#
你可以求条件和得到结果。
rjee0c153#
注意大小写字母移动的内部连接
感谢@liaqatkundi和@dalek