You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-10-31 18:30:33 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			721 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			721 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #
 | |
| # Test case migrated from regression test suite:
 | |
| # ./mysql/queries/working_ssb_compareLogOnly/ssb/q4.3.mod.sql
 | |
| #
 | |
| # Author: Susil, susil.behera@mariadb.com
 | |
| #
 | |
| 
 | |
| -- source ../include/have_columnstore.inc
 | |
| 
 | |
| USE ssb1;
 | |
| # Q4.3
 | |
| select d_year, s_city, p_brand1,
 | |
| sum(lo_revenue - lo_supplycost) as profit
 | |
| from supplier, dateinfo, part, customer,  lineorder	   # changed order
 | |
| where lo_custkey = c_custkey
 | |
| and lo_suppkey = s_suppkey
 | |
| and lo_partkey = p_partkey
 | |
| and lo_orderdate = d_datekey
 | |
| and s_nation = 'UNITED STATES'
 | |
| and (d_year = 1997 or d_year = 1998)
 | |
| and lo_orderdate between 19970101 and 19981231		   # added matching predicate
 | |
| and p_category = 'MFGR#14'
 | |
| group by d_year, s_city, p_brand1
 | |
| order by d_year, s_city, p_brand1;
 | |
| 
 |