首页 \ 问答 \ 如何使用Oracle SQL选择不同的日期范围(How to select distinct date ranges with Oracle SQL)

如何使用Oracle SQL选择不同的日期范围(How to select distinct date ranges with Oracle SQL)

我正在寻找具有下面结构的表格的开始和结束日期的不同行。 我不希望重复的行具有相同的开始和结束月份。 请注意,开始日期和结束日期在这里是NUMBER类型,而不是日期。

tbl_app_ranges:
rg_id   start_month   end_month
105     200401        200409    
105     200401        200409    
110     200701        200712    
110     200701        200710     

我想要的是下面的结果集

rg_id   start_month   end_month
105     200401        200409    
110     200701        200712    
110     200701        200710     

我知道这可以通过分析来完成,但不知道如何。 有没有办法在纯SQL中做到这一点? 我需要查询来针对Oracle数据库。


I'm looking to get distinct rows with a start and end date from a table with structure below. I dont want duplicate rows with same start and end month. Please note that start and end date are NUMBER type here, not date.

tbl_app_ranges:
rg_id   start_month   end_month
105     200401        200409    
105     200401        200409    
110     200701        200712    
110     200701        200710     

What I want is the below result set

rg_id   start_month   end_month
105     200401        200409    
110     200701        200712    
110     200701        200710     

I know this can be done with analytics but not sure how. Is there a way to do this in pure SQL? I need the query to work against Oracle database.


原文:https://stackoverflow.com/questions/33693520
更新时间:2022-08-05 17:08

最满意答案

对于ios 8和9,moviePlayer!.controlStyle = MPMovieControlStyle.None


moviePlayer!.controlStyle = MPMovieControlStyle.None for ios 8 and 9

相关问答

更多
  • 以下面的方式创建MPMoviePlayerController对象将为您提供一个视频控件的界面 yourMoviePlayerController = [MPMoviePlayerController new]; yourMoviePlayerController.controlStyle=MPMovieControlStyleEmbedded; [yourMoviePlayerController setContentURL:[NSURL fileURLWithPath:videoPath]]; ...
  • 解决了这个问题: MPVolumeView *volumeView = [ [MPVolumeView alloc] init] ; [volumeView setRouteButtonImage:[UIImage imageNamed:@"ICAirPlay"] forState:UIControlStateNormal]; [volumeView sizeToFit]; solved it with this: MPVolumeView *volumeView = [ [MPVolumeView al ...
  • 根据Apple的文档,您只需将`MPMoviePlayerController设置为全屏: [moviePlayer setFullscreen:YES animated:YES] 你试过这个吗? As per Apple's documentation, you just have to set the `MPMoviePlayerController to go full screen: [moviePlayer setFullscreen:YES animated:YES] Have you tr ...
  • 您可以将播放器的帧设置为您可以在IB中或以编程方式制作的视图,而不是每次都执行CGRectMake。 self.player.view.frame = self.viewForMovie.bounds; self.player.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 然后在“videoButton1”中,您可以将View的alpha设置为0 viewForMovie ...
  • 添加[theMovie prepareToPlay]; 在致电[theMovie play]; 。 prepareToPlay 准备电影播放器进行播放。 (需要) - (void)prepareToPlay 讨论 如果在调用播放方法时电影播放器尚未准备播放,则该方法会自动调用此方法。 但是,要最小化播放延迟,请在调用播放之前调用此方法。 调用此方法可能会中断电影播放器的音频会话。 有关中断以及如何重新获取它们的信息,请参阅“音频会话编程指南”。 可用性 Available in iOS 3.2 and la ...
  • 对于ios 8和9,moviePlayer!.controlStyle = MPMovieControlStyle.None moviePlayer!.controlStyle = MPMovieControlStyle.None for ios 8 and 9
  • 文档是相当描述性的,但我假设黑屏是一个加载错误: MPMovieFinishReason描述播放结束原因的常量。 enum { MPMovieFinishReasonPlaybackEnded, MPMovieFinishReasonPlaybackError, MPMovieFinishReasonUserExited }; typedef NSInteger MPMovieFinishReason; 常量: MPMovieFinishReasonPlaybackEnded达到 ...
  • 我对同一问题的解决方案是: 添加按钮作为MPMoviePlayerController视图的子项; 使用其alpha属性的动画,使用适当的持续时间淡入淡出按钮; 处理播放器控制器的touchesBegan ,并使用它来切换按钮的可见性(使用其alpha); 使用计时器确定何时再次隐藏按钮。 通过反复试验,我确定匹配(当前)iOS的持续时间是: 淡入:0.1秒 淡出:0.2秒 屏幕上的持续时间:5.0s(每次触摸视图时延伸) 当然这仍然很脆弱; 如果内置延迟发生变化,我的看起来会出错,但代码仍会运行。 My ...
  • 你应该先调用[moviePlayer stop]这将: 停止播放当前项目并将播放头重置为项目的开头。 再次调用播放方法会从项目的开头启动播放。 (来自苹果文档) You should call first [moviePlayer stop] this will: stops playback of the current item and resets the playhead to the start of the item. Calling the play method again initiate ...
  • 视图没有调整大小,因为您的代码永远不会告诉它。 如果希望它在旋转时调整大小,则需要在容器视图因旋转而发生更改时调整MPMoviePlayerController的视图大小。 (在viewWillLayoutSubviews设置框架或使用autolayout将MPMoviePlayerController的视图约束到呈现控制器的视图。) 您也可以使用MPMoviePlayerViewController而不是MPMoviePlayerController 。 来自文档: 与MPMoviePlayerContr ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。