1.6k 1 分钟

1. 根据具体条件统计这批数据落到每组的数量 select to_char(TIMESTAMP, 'yyyy-mm-dd') column1, column2, column3, count(CASE WHEN DURATION<30*60 THEN 1 END) less30, count(CASE WHEN DURATION>=30*60 and DURATION<60*60*1000 THEN 1 END) more30less60, count(CASE WHEN DURATION>=60*60 and...
1k 1 分钟

def get_date_range(): from_date_str, to_date_str = '2019-08-01', '2019-09-09' df_date_range = pd.date_range(from_date_str, to_date_str) df = pd.DataFrame(df_date_range, columns=['Date']) df['Date'] = df.apply(lambda x: x['Date'].strftime("%Y-%m-%d"),...
480 1 分钟

select * from user_tab where user_column<>round(user_column,1);round 函数测试: select round(100.1, 0) from dual; -- 100select round(100.5, 0) from dual; -- 101select round(100.9, 0) from dual; -- 101select round(100.01, 1) from dual; -- 100select round(100.05, 1) from dual; -- 100.1select...
461 1 分钟

MERGE INTO user_tab1 t1USING (select to_char(TIMESTAMP, 'yyyy-mm-dd') daily, CLUSTERNAME, RESULT, count(*) usage from user_tab2 where to_char(TIMESTAMP, 'yyyy-mm-dd') in ('2019-09-03') group by to_char(TIMESTAMP, 'yyyy-mm-dd'), CLUSTERNAME, RESULT) t2on (t1.DAILY =...
3.5k 3 分钟

package com.example.demo.test; import java.util.Vector; /** * <p> * <code>VectorTest</code> * </p> * Description: JDK 1.8 * 测试Vector的扩容方式,通过测试可以看出其每次以2的倍数形式扩充Object数组 * * @author Jalen * @date 2019/8/27 13:31 */ public class VectorTest...
6.4k 6 分钟

package com.example.demo.test; /** * <p> * <code>StringBuilderTest</code> * </p> * Description: JDK 1.8 * * @author Jalen * @date 2019/8/26 9:41 */ public class StringBuilderTest { public static void main(String[] args)...
5.9k 5 分钟

package com.example.demo.test; import java.util.HashMap; import java.util.Map; /** * <p> * <code>HashMapTest</code> * </p> * Description: JDK 1.8 * @see java.util.HashMap 本质上是Node<K,V>[] * * @author Jalen * @date 2019/8/26...
5.4k 5 分钟

package com.example.demo.test; import java.util.ArrayList; import java.util.List; import java.util.Random; /** * <p> * <code>ArrayListTest</code> * </p> * Description: JDK 1.8 普通集合类 * {@link java.util.ArrayList}...
4.1k 4 分钟

package com.example.demo.test; import java.lang.management.ManagementFactory; import java.lang.management.MemoryMXBean; import java.lang.management.MemoryUsage; import java.util.List; /** * <p> * <code>Test</code> * </p> * Description:...