Đã Đóng

DataBase Query to verify quantitys

hello , i am looking to fix a query to verify some stock accounts those 4 to 5 tables some sums to check if the stock is right

must compare the current stock vrs the sum of initial+adjuments stock and if is wrong update with the right value.

SELECT [url removed, login to view],[url removed, login to view] as cantidadInv,sum([url removed, login to view]) as compraSt , sum([url removed, login to view]) as vendido,

SUM(IF([url removed, login to view] = 'addition', [url removed, login to view], 0))-SUM(IF([url removed, login to view] = 'subtraction', [url removed, login to view], 0))+sum([url removed, login to view]) as ajustes

FROM `sma_purchase_items` compra

inner join sma_products productos on [url removed, login to view] = compra.product_id

left join sma_sale_items vendidos on [url removed, login to view] = vendidos.product_id

left join sma_adjustment_items ajustes on vendidos.product_id = ajustes.product_id

group by [url removed, login to view]

this is mostly the query must be fixed due in some rows shows another information. if need i can share the db and explain via teamviewer or similar

Kỹ năng: Quản trị cơ sở dữ liệu, Phát triển cơ sở dữ liệu, Lập trình cơ sở dữ liệu, MySQL

Xem thêm: script query database size, input output query database, wordpress query database, php drop list query database, oscommerce database tables products, script php query database, need products sale, php query database drop, user forms query database, online products sale, oscommerce database missing products, execution query database failed modx, arcgis serve query database, database amazon products, query database web form

Về Bên Thuê:
( 0 nhận xét ) United States

Mã Dự Án: #13121483

10 freelancer đang chào giá trung bình $34 cho công việc này

$30 USD trong 1 ngày
(7 Đánh Giá)
4.7
$111 USD trong 1 ngày
(4 Đánh Giá)
4.1
testotorko

Hi, I read carefully your project, and I wanna do it for you. If you wanna work together, send me a message to discuss details. I am an experienced Web Developer and Web Designer, and have worked with wide variety of s Thêm

$25 USD trong 1 ngày
(6 Đánh Giá)
3.6
amjadali4888

Greetings I have read your job description and I want to talk about more that regards that I can do that project within the time frame I have more than 3 years’ experience in web development skills like PHP WordPre Thêm

$25 USD trong 1 ngày
(6 Đánh Giá)
3.1
shahgsahab1

Website Design and Development Developer Who Creates Innovation For You! ONLY FOR YOU We have years of development and implementation experience on projects ranging from small departmental applications through comp Thêm

$25 USD trong 1 ngày
(2 Đánh Giá)
1.4
olarid

Hi, I read through your request. I can fix the query. I have up to six years of experience working with various databases (Mysql, ms sql, oracle) using Structure Query Language (SQL) to perform tasks raging from simp Thêm

$25 USD trong 1 ngày
(0 Đánh Giá)
0.0
graphichaks24

A proposal has not yet been provided

$25 USD trong 1 ngày
(0 Đánh Giá)
0.0
aap31374

I have 10+ years database development experience in sql server, Mysql and Postgres. I have also worked in SSIS and SSRS. I assure that i will give you fully satisfaction about this assignment.

$25 USD trong 1 ngày
(0 Đánh Giá)
0.0
veslar

I think the problem lies in this join LEFT JOIN sma_sale_items vendidos ON [url removed, login to view] = vendidos.product_id should be changed to LEFT JOIN sma_sale_items vendidos ON compra.product_id = [url removed, login to view] Thêm

$15 USD trong 1 ngày
(0 Đánh Giá)
0.0
$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
arindamkumar

A proposal has not yet been provided

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
$25 USD trong 1 ngày
(0 Đánh Giá)
0.0