首页 \ 问答 \ 带有IN和SELECT子查询的CASE(CASE with IN and SELECT subquery)

带有IN和SELECT子查询的CASE(CASE with IN and SELECT subquery)

我想在CASE逻辑中使用Select子查询执行IN语句(MySQL方言一直在使用)

所以查询的想法是这样的:

select a.client_id,
(case when a.client_id in (select distinct a.client_id from account a
where a.display_name='b') then '1' else '0' end) as binary
from account a
group by a.client_id
order by a.client_id

它显示错误,所以我想知道它是如何被替换和重写的?

谢谢!


I want to perform IN statement with a Select subquery in a CASE logic (MySQL dialect's been using)

So the idea of the query is like this:

select a.client_id,
(case when a.client_id in (select distinct a.client_id from account a
where a.display_name='b') then '1' else '0' end) as binary
from account a
group by a.client_id
order by a.client_id

It shows error, so I'm wondering how it can be replaced and rewritten?

Thanks!


原文:
更新时间:2022-03-23 14:03

最满意答案

实际上,WebRTC和sip.js服务于不同的目的。 WebRTC用于实现P2P连接以流式传输音频,视频和数据。 sip.js是SIP的JS实现,可以用作WebRTC的信令协议。 我写了一篇文章,您可以在其中找到有关WebRTC的更多详细信息以及信令协议的不同选项: https//beradrian.wordpress.com/2015/02/05/webrtc-saga/


Actually WebRTC and sip.js serve different purposes. WebRTC is used to implement P2P connection to stream audio, video and data. sip.js is a JS implementation of SIP that can be used as a signaling protocol for WebRTC. I wrote an article in where you can find more details about WebRTC and different options for signaling protocol: https://beradrian.wordpress.com/2015/02/05/webrtc-saga/.

相关问答

更多
  • 我遇到同样的问题,偶然发现了这两个宝石: https://github.com/helloIAmPau/node-rtc可悲的是它缺少任何文档。 但是https://github.com/js-platform/node-webrtc对我来说似乎更可靠。 I came along the same problem and stumbled upon these two gems: https://github.com/helloIAmPau/node-rtc Sadly it is lacking any ...
  • 你必须去github上的“发布”页面: Aurora.js: https : //github.com/audiocogs/aurora.js/releases Flac.js: https : //github.com/audiocogs/flac.js/releases You have to go to "releases" page on github: Aurora.js: https://github.com/audiocogs/aurora.js/releases Flac.js: https ...
  • 这家伙有很多有趣的WebRTC实验,包括音频/视频录制: https : //github.com/muaz-khan/ 以下是录制演示: https : //www.webrtc-experiment.com/RTCMultiConnection-v1.4-Demos/RecordRTC-and-RTCMultiConnection.html 它收集客户端上的音频和视频流,并为您提供一个音频和一个视频块,然后您可以上传/拼接在一起。 我想,不完全是你所希望的,但可能可以完成这项工作。 希望有所帮助。 Th ...
  • 好的,所以我终于找到了我的问题的解决方案,我想在这里分享。 我为解决这个问题所做的是在麦克风的“普通”录音脚本中添加一行简单的代码。 录制麦克风音频的脚本是: window.AudioContext = window.AudioContext || window.webkitAudioContext; var audioGlobalContext = new AudioContext(); var audioOutputAnalyser var inputPoint = null, audioRe ...
  • 最简洁的答案是不”。 WebRTC本身很新,其中一部分仍在不断发展。 尽管getUserMedia已经存在时间最长,但TideSDK使用的是非常旧版本的Webkit。 因此,许多新的“玩具”都无法使用。 您将看到对navigator.getUserMedia的调用返回undefined。 The short answer is "no". WebRTC itself is pretty new and parts of it are still evolving. Although getUserMedia ...
  • 您无法关闭SRTP。 它是标准的一部分,可能永远不会删除。 密钥在DTLS密钥交换中交换,并且会有一段时间,因为Mozilla和Chrome都同意这是交换媒体的最佳和最安全的方式。 该指纹本身不是密钥,密钥通过DTLS交换,如果您在其中一台机器上使用wireshark监听,您实际上可以看到DTLS交换,这样您就可以看到交换机正在发生的事情。 您需要实现断路器以与webrtc客户端和SIP客户端连接。 SIPML5已经有一个断路器在起作用 。 You cannot turn off SRTP. It is p ...
  • 解: 最后找到它,使用下面的选项,它的工作原理! ./configure --prefix=$PREFIX CFLAGS='-lpthread' LDFLAGS='-ldl' LIBS='-ldl' Solution: Finally find it, used following option and it works! ./configure --prefix=$PREFIX CFLAGS='-lpthread' LDFLAGS='-ldl' LIBS='-ldl'
  • 您可能希望在https://github.com/Mobicents/restcomm-ios-sdk上使用RestComm iOS SDK(并可能有助于)。 它使用索菲亚SIP协议栈。 I found a nice open source SIP library with small footprint called libre.
  • 实际上,WebRTC和sip.js服务于不同的目的。 WebRTC用于实现P2P连接以流式传输音频,视频和数据。 sip.js是SIP的JS实现,可以用作WebRTC的信令协议。 我写了一篇文章,您可以在其中找到有关WebRTC的更多详细信息以及信令协议的不同选项: https : //beradrian.wordpress.com/2015/02/05/webrtc-saga/ 。 Actually WebRTC and sip.js serve different purposes. WebRTC is ...
  • 下面是我使用自己的SIP服务器的基本节点脚本。 您需要替换自己测试的凭据和IP地址。 代理脚本不会向客户端发送重定向响应,而是代表客户端向服务器发起新事务。 在此模式下运行的SIP服务器更准确地称为背靠背用户代理(B2BUA)。 我没有添加所需的所有功能,例如匹配并将响应传递回原始客户端; 这方面涉及相当多的工作。 var sip = require('sip'); var digest = require('sip/digest'); var util = require('util'); var os ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)