in LandaV8: Specify the Person in which department ~!

本文介绍了一种复杂的SQL查询方法,该方法结合使用了多个表的数据,包括CSORGA_1和CSEMPL_1表,以获取组织和员工的相关信息。

Select * from(

(select VGUID,ODESC as DESC0,ODESCCHS as DESC1,PGUID,OID as ZORDER from CSORGA_1 where VGUID in ('8E7B0EE5-F625-4202-B3DD-A2EAED2A673D','EA934841-142C-4E7C-A610-D627C76739CB') )union

 (select VGUID,DCNAME as DESC0,DCNAMECHS as DESC1,DCDEPT as PGUID,DCNO as ZORDER FROM CSEMPL_1 where DCDEPT in

 ('EA934841-142C-4E7C-A610-D627C76739CB'))

)A ORDER BY ZORDER

 

 

 

 

 

on the top ,we can find there have two vguid in the CSORGA_1 tabel ,

becauses we should bring the up company name ,

so there will be one more vguid in the sentence ~!

and there is one more vguid in the CSEMPL_1 tabel ,

it will bring the person which in the department ~!

题目描述 Every fall, all movies are shown to a full house at one of the most popular cinema theatres in Yekaterinburg because students like to spend their time sitting in a cosy chair and watching a movie instead of attending lectures and seminars. Unfortunately, the distance between the rows of seats in the cinema hall is small, and people constantly stumble over other people's feet as they get to their seats before the film exhibition. Entering the hall, a visitor chooses from which end of the row (left or right) he will make his way to his seat. He chooses it in such a way that the number of people over whose feet he will stumble will be minimal. If these numbers are equal for the left and right ends, the visitor chooses the end of the row which is closer to his seat. Student of the Department of Philosophy Vasya is an enthusiastic movie-goer and an equally enthusiastic hater of mathematics. He was the first to buy a ticket to the first exhibition of a new movie. When Vasya entered the hall and sat down in his seat, he saw that other seats in the row were still unoccupied. Vasya knew that by the time the exhibition started the hall would be full. Therefore, quite a number of other visitors would stumble over his feet while getting to their seats. Despite his hatred for mathematics, Vasya was able to instantly estimate the maximal number of people that would stumble over his feet before the exhibition. Can you do the same? 每年秋天,叶卡捷琳堡最受欢迎的电影院之一的所有电影都会座无虚席,因为学生们喜欢坐在舒适的椅子上看电影,而不是参加讲座和研讨会。不幸的是,电影院里的两排座位之间的距离很小,人们在电影放映前就座时经常被别人绊倒。进入大厅后,访客可以选择从排的哪一端(左端或右端)就座。他选择的方式是让他绊倒的人数最少。如果左右两端的数字相等,则访客会选择最靠近他座位的那排末端。 哲学系学生瓦夏 (Vasya) 是一名狂热的电影爱好者,同时也是一名数学狂热爱好者。他是第一个购买新电影首映门票的人。当瓦夏走进大厅,在自己的座位上坐下时,他看到这一排的其他座位还空着。瓦夏知道,当展览开始时,大厅里已经挤满了人。因此,不少其他观众在入座时都会被他的脚绊倒。尽管瓦夏讨厌数学,但他还是能够立即估计出在展览前被他绊倒的最大人数。你能做同样的事吗? 输入 Input The only input line contains the total number of seats n in the row where Vasya is sitting and the number of his seat k (1 ≤ k ≤ n ≤ 50; n is even). These integers are separated with a space. The seats in the row are numbered starting with one. 唯一的输入行包含Vasya 所在行的 座位总数 n以及他的座位号k (1 ≤ k ≤ n ≤ 50; n 为偶数)。这些整数之间用空格分隔。一排的座位是从一开始编号的。 输出 Output Output the maximal number of people who would stumble over Vasya's feet. 输出最多有多少人会被 Vasya 绊倒。 样例输入 复制 4 1 样例输出 复制 1
最新发布
09-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值