columns中包含:电子票号/航班号/航班日期/起始到到达站/起始站/到达站/主舱位/子舱位/座位号/行李件数/行李重量,航班日期按照YYMMDD储存,日期维度包含20190101-20191231,格式为Varchar,现准备查找20190501-20190531期间每个起始站的行李总重量和行李总件数
时间: 2023-07-08 13:46:30 浏览: 121
您可以使用以下SQL查询来查找20190501-20190531期间每个起始站的行李总重量和行李总件数:
```
SELECT 起始站, SUM(行李件数) AS 行李总件数, SUM(行李重量) AS 行李总重量
FROM 表名
WHERE 航班日期 BETWEEN '190501' AND '190531'
GROUP BY 起始站;
```
其中,`表名`为您存储航班信息的表名。`航班日期`是以YYMMDD格式存储的,因此可以直接使用BETWEEN和字符串进行比较。`SUM`函数用于计算行李总件数和行李总重量,`GROUP BY`语句用于按起始站对结果进行分组。
相关问题
GridLayout{ id:gridLayout anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom anchors.bottomMargin: 43 anchors.rightMargin: 7 anchors.leftMargin: 8 anchors.topMargin: 12 columns: 8 //两列 rows: 1 //两行 columnSpacing: 3 rowSpacing: -50 Repeater{ id: rep model: controlTwo.imageSum ImageArea{ color: "#00FFFFFF" topTextAreaOpacity: 1 topTextFontpixelSize: 16 floor:index+controlTwo.imageStartPos //层设置 topText: floor=="8" ? "工具柜结构" : "第"+(floor)+"层" width: (gridLayout.width -( gridLayout.columns-1)*gridLayout.columnSpacing)/gridLayout.columns height: 150 imgTopMagin: 8 topTextColor: "#ffffff" topTextAreaColor: "#002949" image.imgsrc: controlTwo.getImageUrlFunc(floor) x : floor z : floor anchors.bottom: parent.bottom MouseArea{ anchors.fill: parent onClicked: { // 《--点击方法图片--》 controlTwo.clickedImg(parent.image.source, gridLayout.columns, index) controlTwo.enlargeImg(parent.floor) //开始放大图片 bigImage.topText = parent.topText bigImage.image.imgsrc = parent.image.source bigImage.visible = true } } } }//!repeater }//!gridlayout 使用qml在现有代码上增加图片从左到右重叠效果并把新加的代码打上注释
下面是增加图片重叠效果并注释的代码:
```
GridLayout {
id: gridLayout
// 设置布局的边距和位置
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.bottomMargin: 43
anchors.rightMargin: 7
anchors.leftMargin: 8
anchors.topMargin: 12
// 设置布局的列数和行数
columns: 8
rows: 1
// 设置列间距和行间距
columnSpacing: 3
rowSpacing: -50
// 使用 Repeater 循环添加图片
Repeater {
id: rep
model: controlTwo.imageSum
// 添加图片区域
ImageArea {
// 设置颜色透明度
color: "#00FFFFFF"
// 设置顶部文本的透明度和字体大小
topTextAreaOpacity: 1
topTextFontpixelSize: 16
// 设置图片的层级
floor: index + controlTwo.imageStartPos
topText: floor == "8" ? "工具柜结构" : "第" + (floor) + "层"
// 设置图片区域的宽度和高度
width: (gridLayout.width - (gridLayout.columns - 1) * gridLayout.columnSpacing) / gridLayout.columns
height: 150
imgTopMagin: 8
topTextColor: "#ffffff"
topTextAreaColor: "#002949"
// 设置图片的路径
image.imgsrc: controlTwo.getImageUrlFunc(floor)
// 设置图片的位置
x: floor * (width - 20)
z: floor
anchors.bottom: parent.bottom
// 添加鼠标区域
MouseArea {
anchors.fill: parent
// 设置点击事件
onClicked: {
controlTwo.clickedImg(parent.image.source, gridLayout.columns, index)
controlTwo.enlargeImg(parent.floor)
bigImage.topText = parent.topText
bigImage.image.imgsrc = parent.image.source
bigImage.visible = true
}
}
}
}
}
```
GridLayout{ id:gridLayout anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom anchors.bottomMargin: 43 anchors.rightMargin: 7 anchors.leftMargin: 8 anchors.topMargin: 12 columns: 8 //两列 rows: 1 //两行 columnSpacing: 3 rowSpacing: -50 Repeater{ id: rep model: controlTwo.imageSum ImageArea{ color: "#00FFFFFF" topTextAreaOpacity: 1 topTextFontpixelSize: 16 floor:index+controlTwo.imageStartPos //层设置 topText: floor=="8" ? "工具柜结构" : "第"+(floor)+"层" width: (gridLayout.width -( gridLayout.columns-1)*gridLayout.columnSpacing)/gridLayout.columns height: 150 imgTopMagin: 8 topTextColor: "#ffffff" topTextAreaColor: "#002949" image.imgsrc: controlTwo.getImageUrlFunc(floor) x : floor z : floor anchors.bottom: parent.bottom MouseArea{ anchors.fill: parent onClicked: { // 《--点击方法图片--》 controlTwo.clickedImg(parent.image.source, gridLayout.columns, index) controlTwo.enlargeImg(parent.floor) //开始放大图片 bigImage.topText = parent.topText bigImage.image.imgsrc = parent.image.source bigImage.visible = true } } } }//!repeater }//!gridlayout 使用qml在现有代码上增加图片重叠效果并把新加的代码打上注释
好的,以下是增加图片重叠效果的代码,已经打上注释:
```
GridLayout{
id:gridLayout
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.bottomMargin: 43
anchors.rightMargin: 7
anchors.leftMargin: 8
anchors.topMargin: 12
columns: 8 //两列
rows: 1 //两行
columnSpacing: 3
rowSpacing: -50
// 重叠图片的容器
Item {
id: overlapContainer
anchors.fill: parent
z: 1 // 设置 z 值,使其位于图片下方
}
Repeater{
id: rep
model: controlTwo.imageSum
// 图片区域
ImageArea{
color: "#00FFFFFF"
topTextAreaOpacity: 1
topTextFontpixelSize: 16
floor:index+controlTwo.imageStartPos //层设置
topText: floor=="8" ? "工具柜结构" : "第"+(floor)+"层"
width: (gridLayout.width -( gridLayout.columns-1)*gridLayout.columnSpacing)/gridLayout.columns
height: 150
imgTopMagin: 8
topTextColor: "#ffffff"
topTextAreaColor: "#002949"
image.imgsrc: controlTwo.getImageUrlFunc(floor)
x : floor
z : floor // 设置 z 值,使其位于其他图片上方
anchors.bottom: parent.bottom
MouseArea{
anchors.fill: parent
onClicked: {
// 《--点击方法图片--》
controlTwo.clickedImg(parent.image.source, gridLayout.columns, index)
controlTwo.enlargeImg(parent.floor) //开始放大图片
bigImage.topText = parent.topText
bigImage.image.imgsrc = parent.image.source
bigImage.visible = true
}
}
// 将图片添加到重叠容器中
Component.onCompleted: {
overlapContainer.children.push(image)
}
}
}//!repeater
}//!gridlayout
```
阅读全文