Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

How can i write this SQL

$
0
0
suppose i have the following tables

Code:

items_data
==========
int primary id,
string name,
double price

orders_data
==========
int primary id,
Date date,                       
                                       
orders_details_increase     
================       
int primary id,                   
int order_id,
int item_id,
int quantity,
double sale_price,
double value

orders_details_decrease     
================       
int primary id,                   
int order_id,
int item_id,
int quantity,
double sale_price,
double value


i wana get how many orders that have an item with id = 1??????

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>