text stringlengths 6 9.38M |
|---|
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64)
--
-- Host: localhost Database: ahmed_ghouzlane
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... |
/*
Navicat Premium Data Transfer
Source Server : my_test
Source Server Type : MySQL
Source Server Version : 50723
Source Host : localhost:3306
Source Schema : task3
Target Server Type : MySQL
Target Server Version : 50723
File Encoding : 65001
Date: 11/12/2018 21:59:... |
CREATE DATABASE prevezi_me_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
----------KORISNIK----------
CREATE TABLE korisnik (
idkorisnik int(11) NOT NULL,
ime varchar(45) NOT NULL,
prezime varchar(45) NOT NULL,
godina_rodjenja int(11) NOT NULL,
godine_iskustva int(11) NOT NULL,
pol varchar(45) NOT N... |
CREATE TABLE `captcha_answers` (
`id` int(11) unsigned NOT NULL,
`expected_value` int(11) NOT NULL,
`created_at` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
INSERT INTO `captcha_answers` (`id`, `expected_value`, `created_at`) VALUES
(1, 6, 1422127584);
CREATE TABLE `items` (
`id` int(1... |
/*
This script cleans WIC clinic address data
Written by: Rashida Brown
*/
CREATE TABLE wic_add_full_fin AS
SELECT *,
CASE WHEN "BusinessSt" LIKE ('%Box%') THEN ''
WHEN "BusinessSt" NOT LIKE ('%Box%')
THEN (rtrim("BusinessSt", ' ') || ', ' ||
rtrim("BusinessC... |
rem
rem $Header: utlopget.sql,v 1.2 1993/07/07 15:10:45 lwillis Exp $
rem
REM Copyright (c) 1993 by Oracle Corporation
REM NAME
REM utlopget.sql - optimizer get table information
REM DESCRIPTION
REM Get table information for optimizer export tables for simulator
REM NOTES
REM This method of expo... |
/* Team Enrollment tables */
/* ID field must be and INTEGER and not an INT to increment correctly */
/* Join table. Student to Section relation */
CREATE TABLE Waitlist(
SECTION_ID INTEGER NOT NULL,
STUDENT_ID INTEGER NOT NULL,
ADDED_DATE DATE,
FOREIGN KEY(SECTION_ID) REFERENCES Section(ID),
FOREIGN KEY(STUDENT_... |
CREATE TABLE `orders` (
`order_no` varchar(200) NOT NULL,
`product_name` varchar(20) ,
`total_fee` int(11) not null default 0,
`IP_Address` varchar(32),
`pay_type` varchar(10) not null ,
`creation_date` timestamp not null default CURRENT_TIMESTAMP,
`pay_date` timestamp null default null,
`user_id` int(... |
use tinnitus_talks;
create table users (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(64),
first_name VARCHAR(64),
last_name VARCHAR(64),
email VARCHAR(64),
description longtext,
password VARCHAR(64),
dateOfBirth DATE,
streetAddress1 VARCHAR(124),
... |
-- Adminer 4.7.8 MySQL dump
SET NAMES utf8;
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `StatServer_5`;
CREATE TABLE `StatServer_5` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`name` varchar(... |
-- Jus hadi A rman S az
INSERT INTO `setting` (`setting_id`, `setting_name`, `setting_value`) VALUES
-- Jushadi Arman Saz
(NULL, 'barcode_print_settings', ''),
-- Jusha di Arm an S az
(NULL, 'label_print_settings', ''),
-- Jush adi Ar man S az
(NULL, 'membercard_print_settings', '');
ALTER TABLE `mst_member_type` ADD... |
CREATE TABLE STUDENTS(
STUDENTNUMBER INT PRIMARY KEY NOT NULL,
STUDENTNAME CHAR(50) NOT NULL,
STUDENTAGE INT NOT NULL
)
INSERT INTO STUDENTS VALUES
(1,"Nils-Erik", 21),
(2,"Olav", 22),
(3,"Zorab", 22),
(4,"Marcus", 23)
SELECT * FROM STUDENTS WHERE STUDENTAGE>21 |
SELECT TOP (50) Name, LEFT(CONVERT(varchar, Start, 120), 10) AS Start
FROM Games
WHERE YEAR(Start) IN (2011, 2012)
ORDER BY Games.Start, Name |
with f as
(select fantoir from cumul_voies where fantoir != ''
except
SELECT code_insee||id_voie||cle_rivoli fantoir
FROM fantoir_voie)
select v.fantoir,v.voie_osm,st_x(v.geometrie),st_y(v.geometrie)
from cumul_voies v
join f
on v.fantoir = f.fantoir
order by 1
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 19-Dez-2019 às 16:37
-- Versão do servidor: 10.3.16-MariaDB
-- versão do PHP: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
DROP TABLE IF EXISTS tabulka1 CASCADE;
-- vytvorime tabulku s jednim sloupcem, obsahujicim pouze sude hodnoty
CREATE TABLE tabulka1 AS SELECT 2*i AS i FROM generate_series(1,100000) s(i);
ANALYZE tabulka1;
-- jednoducha "korektni" podminka
EXPLAIN ANALYZE SELECT * FROM tabulka1 AS tabulka1_a JOIN tabulka1 AS tabulka... |
BEGIN
/* Start profiling.
Write raw profiler output to file test.trc in a directory
that is mapped to directory object PLSHPROF_DIR
(see note following example). */
DBMS_HPROF.START_PROFILING('PLSHPROF_DIR', 'test.trc');
END;
/
--SELECT * FROM TABLE(ccard(collection_type('A','B','C')));
explain p... |
-- -*- mode: sql; sql-product: postgres -*-
create schema pgcrypto;
create extension if not exists pgcrypto schema pgcrypto;
create user "api" noinherit;
comment on role api is
$$API role used for API abstractions like PostgREST$$;
alter role "api" with login;
grant usage on schema public to api;
grant select,inse... |
create database db_escola;
use db_escola;
create table tb_alunos (
id bigint auto_increment,
nome varchar(255) not null,
idade int not null,
matricula bigint not null,
nota int not null,
primary key (id)
);
insert into tb_alunos (nome, idade, matricula, nota) values ("Arthur", 13, 1111, 8);
insert into tb_alunos (no... |
-- phpMyAdmin SQL Dump
-- version 4.0.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SE... |
SELECT * FROM line_items WHERE id = 190;
WITH counts AS (
SELECT burger * count AS burger_count,
line_items.combo_num, line_items.size, count FROM line_items RIGHT OUTER JOIN combos ON line_items.combo_num = combos.combo_num
WHERE id = 190 GROUP BY burger, line_items.combo_num, line_items.size, line_items.count
... |
-- Table: TOURNAMENT_PLAYER
CREATE TABLE TOURNAMENT_PLAYER (
TOURNAMENT_ID DECIMAL(16,2) NOT NULL ,
PLAYER_ID DECIMAL(16,2) NOT NULL DISTKEY SORTKEY,
PRIMARY KEY(tournament_id, player_id),
FOREIGN KEY(PLAYER_ID) REFERENCES LOBBY_USER(PLAYER_ID)
)
;
GRANT SELECT ON TOURNAMENT_PLAYER TO GROUP READ_ONLY;
GRANT ALL... |
TRUNCATE TABLE AAE0376.GP_TRACKER_13MO;
DROP TABLE AAE0376.GP_TRACKER_13MO;
CREATE TABLE AAE0376.GP_TRACKER_13MO
AS
(SELECT SUBSTR (ihf.YEARMONTH, 0, 4) YYYY,
ihf.YEARMONTH,
DECODE (
ihf.YEARMONTH,
TO_CHAR (TRUNC (SYSDATE - NUMTOYMINTERVAL (12, 'MONTH'), 'MONTH'),
... |
INSERT INTO foo VALUES(10,"ten","mumbai");
INSERT INTO foo VALUES(5,"five","pune");
INSERT INTO foo VALUES(25,"twenty-five","chennai");
|
CREATE TABLE Collection(
Name VARCHAR(30) NOT NULL,
Type VARCHAR(30) NOT NULL,
Description VARCHAR(512) NOT NULL,
Address VARCHAR(50) NOT NULL,
PhoneNumber VARCHAR(30) NOT NULL,
ContactPersonName VARCHAR(50) NOT NULL,
PRIMARY KEY(Name)
); |
# 已更新到 福利内购
# 已更新到 企业采购
-- 楼层表
CREATE TABLE `ims_superdesk_shop_pc_floor_category` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`category_id` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`createtime` int(10) DEFAULT '0',
`updatetime` int(10) DEFAULT '0',
`en... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50617
Source Host : localhost:3306
Source Database : dbfotocopie
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2015-05-13 11:34:59
*/
SET FOREIGN_KEY_CHECKS... |
insert into
KeyOptions
(
KeyActionId,
KeyOptionName,
KeyOptionValue,
CreatedTimestamp,
CreatedAccount,
CreatedProgramName,
CreatedProgramVersion
)
values
(
/* KeyActionId */ @KeyActionId,
/* KeyOptionName */ @KeyOptionName,
/* KeyOptionValue */ @KeyOptionValue,
... |
-- SELECT name, id, email, cohort_id
-- FROM students
-- WHERE NOT email LIKE '%gmail.com';
SELECT name, id, email, cohort_id
FROM students
WHERE email NOT LIKE '%gmail.com'
AND phone IS NULL; |
--CREATE DATABASE AdresDefteriDb;
--GO
USE AdresDefteriDb;
CREATE TABLE Adresler
(
Id INT PRIMARY KEY IDENTITY,
Ad NVARCHAR(50) NOT NULL,
Soyad NVARCHAR(50),
Telefon NVARCHAR(15),
Adres NVARCHAR(400)
);
INSERT INTO Adresler(Ad, Soyad, Telefon, Adres) VALUES
(N'Ali', N'Yılmaz', N'+905051234567', N'Çamlıca Ma... |
SELECT cst.col_id AS ID,
cst.col_name AS TransitionName,
cst.col_iconcode AS TransitionIconCode,
csts.col_activity AS NextActivity,
csts.col_code AS NextActivity_Code,
dim.col_code AS CaseNextStateI... |
delete from NhanVien
where NhanVien.IDNhanVien in
(select hd.IDNhanVien
from HopDong as hd
where year(hd.NgayLamHopDong) < 2017 or year(hd.NgayLamHopDong)> 2019
group by hd.IDNhanVien)
|
DECLARE
java number;
dbms number;
co number;
total number;
avarage number;
percentage number;
BEGIN
java :=&java;
dbms:=&dbms;
co:=&co;
total:=(java+dbms+co);
avarage:=(total/3);
percentage :=(avarage/300)*100;
dbms_output.put_line('percentagecen... |
ALTER TABLE crmacctsel ADD crmacctsel_mrg_crmacct_number BOOL NOT NULL DEFAULT FALSE;
|
SELECT * FROM `tf-hackathon-236400.usgs_v3.gsvb_all_data_matched_fields`
union all
select * from `tf-hackathon-236400.usgs_v3.usgs_combined`
|
CREATE TABLE games (
id int(11) auto_increment PRIMARY KEY,
user_id int(11),
lifes int(11)
)ENGINE=InnoDB; |
ALTER TABLE projects DROP COLUMN force_https;
|
-- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 05, 2020 at 02:47 PM
-- Server version: 5.6.49-cll-lve
-- PHP Version: 7.3.6
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
WITH ids AS (
SELECT *, row_number() OVER( ORDER BY record_date ) AS idx
FROM 0050tw
),
condition_ids AS (
SELECT *, idx- row_number() OVER( ORDER BY idx ) AS diff
FROM ids
WHERE ( record_date BETWEEN '2008-01-01' AND '2020-05-14' )
AND open_price > 20
AND close_price > 61
)
S... |
insert into action values(null,"/splash","启动图");
insert into action values(null,"/main","App主页Activity");
insert into action values(null,"/zhihu/main","知乎日报主页");
insert into action values(null,"/zhihu/details","知乎日报详情");
insert into action values(null,"/gank/main","干货主页");
insert into action values(null,"/gank/search",... |
SELECT * FROM movies$
--CREATE BOX_OFFICE COLUMN
SELECT name,budget,gross,
CASE
WHEN gross<=budget THEN 'box-office-flop'
ELSE 'box-office-hit'
END box_office
from movies$
ORDER BY score, name;
ALTER TABLE movies$
ADD box_office VARCHAR(550);
UPDATE movies$
SET box_office=
CASE
WHEN gross<=budget THEN 'box-offi... |
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dct: <http://www.w3.org/... |
# Create a database /tmp/movies.db using SQLite3
# Create a table in it called "MOVIES"
# Insert data
import sqlite3
conn = sqlite3.connect('/tmp/movies.db')
conn.execute('CREATE TABLE IF NOT EXISTS MOVIES (Name TEXT NOT NULL, '
'Year INT NOT NULL,'
'Rating INT NOT NULL);')
conn.execute('IN... |
-- script to list all records of database
SELECT `score`,`name` FROM second_table WHERE name IS NOT NULL ORDER BY score DESC;
|
-- create and setup PA user before starting the analysis
-- This user should hold the list of invalid objects before the analysis starts
-- This user can be used for static analysis
conn / as sysdba
create tablespace rk_priv_ana datafile '/ora2/oradata/PFSJUT/rk_priv_ana01.dbf' size 5g autoextend on maxsize unlimited... |
-- SELECT COUNT(CITY) AS TOTALCOUNT,COUNT(DISTINCT CITY) AS DISTINCTCOUNT, TOTALCOUNT - DISTINCTCOUNT FROM STATION;
SELECT
(COUNT(CITY) - COUNT(DISTINCT CITY))
FROM
STATION; |
use drip;
CREATE TABLE `drip`.`gcm` (
`gcm` VARCHAR(200) NOT NULL,
`device` VARCHAR(45) NOT NULL,
`userid` VARCHAR(45) NOT NULL,
PRIMARY KEY (`gcm`));
|
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2021 at 07:40 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
#################################
# Manual dataset #
#################################
##########################################################################
## RQ1 - How much of design self-admitted technical debt gets removed ? ##
###################################################################... |
/* In this demo we learned to
1) alter a table
2) add attributes
3) modify attributes
4) drop primary key attribute
*/
use pokedex;
alter table pokemon
add gender varchar(1);
alter table pokemon
modify gender int;
alter table pokemon
add PRIMARY KEY (gender);
alter table pokemon
drop primary key;
alter... |
DROP TABLE PRODV5.CONCEPT PURGE;
DROP TABLE PRODV5.VOCABULARY PURGE;
DROP TABLE PRODV5.CONCEPT_RELATIONSHIP PURGE;
DROP TABLE PRODV5.RELATIONSHIP PURGE;
DROP TABLE PRODV5.CONCEPT_SYNONYM PURGE;
DROP TABLE PRODV5.CONCEPT_ANCESTOR PURGE;
DROP TABLE PRODV5.DOMAIN PURGE;
DROP TABLE PRODV5.DRUG_STRENGTH PURGE;
DROP TABLE PR... |
USE SoftUni
--Problem 01.
SELECT TOP(5) e.EmployeeID,e.JobTitle,e.AddressID,a.AddressText
FROM Employees AS e
JOIN Addresses AS a
ON e.AddressID = a.AddressID
ORDER BY a.AddressID
--Problem 02.
SELECT TOP(50)
e.FirstName,e.LastName,t.[Name] AS [Town],a.AddressText
FROM Employees AS e
JOIN Addresses AS a ON e.Add... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 15, 2020 at 12:10 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
create or replace PACKAGE PK_TE_EX AS
EX_TE_GENERAL exception;
CEX_TE_GENERAL constant pls_integer := -20999;
pragma EXCEPTION_INIT( EX_TE_GENERAL, -20999 );
EX_TE_OF_WRONG_TYPE exception;
CEX_TE_OF_WRONG_TYPE constant pls_integer := -20998;
pragma EXCEPTION_INIT( EX_TE_OF_WRONG_TYPE, -20998 );
EX_TE_IS_NULL except... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 15, 2020 at 03:32 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
CREATE TABLE `person` (
`name` varchar(100) DEFAULT NULL,
`username` varchar(100) DEFAULT NULL
) DEFAULT CHARSET=utf8mb4 |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE category
(
id INT AUTO_INCREMENT,
name VARCHAR(32) NOT NULL,
CONSTRAINT `PRIMARY`
PRIMARY KEY (id)
);
CREATE UNIQUE INDEX unique_name
ON category (name);
-- +goose Down
-- SQL section 'Down' is executed when this mi... |
CREATE DEFINER=`root`@`localhost` PROCEDURE `ForumSearch`(
search varchar(320))
BEGIN
Select interestGroup, title, comments, c.userId FROM ForumComments c
INNER JOIN ForumTitle t
ON t.id = c.titleId
Where c.comments Like search OR
t.title Like search;
END |
ALTER TABLE "public"."fileobjects" ALTER COLUMN "size" SET NOT NULL;
|
-- Show all rows
SELECT score, name FROM second_table ORDER BY score DESC;
|
CREATE table CONSULTATII (
CNP BIGINT NOT NULL,
NR_CONSULTATIE INT NOT NULL,
DATA_CONSULTATIE DATE NOT NULL,
DIAGNOSTIC VARCHAR(50) NOT NULL,
MEDICAMENTATIE VARCHAR(100),
PRIMARY KEY (CNP)
);
create table PACIENT (
PID INT NOT NULL,
CNP_FK BIGINT NOT NULL,
Adresa VA... |
/*
Navicat MySQL Data Transfer
Source Server : ceshi
Source Server Version : 50717
Source Host : 180.168.156.212:2132
Source Database : cssp_test
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-05-11 17:28:43
*/
SET FOREIGN_KEY_CHECKS=0;
... |
/*------------------------------------------------------------------------------------------------*/
/* */
/* eTraxis - Records tracking web-based system. */
/* Copyright (C)... |
-- -----------------------------
-- Think MySQL Data Transfer
--
-- Host : 127.0.0.1
-- Port : 3306
-- Database : ds_cms
--
-- Part : #1
-- Date : 2018-11-09 11:45:09
-- -----------------------------
SET FOREIGN_KEY_CHECKS = 0;
-- -----------------------------
-- Table structure for `ds_admin`
-- --------... |
select
o.* ,
(select IFNULL(SUM(c.ea_quantity),0) from cs_order_cargo c where c.order_no = o.order_no ) as ea_quantity
from cs_order o
where 1 = 1
<< and o.id = :id >>
<< and o.id in (:ids) >>
<< and o.order_no in (:order_nos) >>
<< and o.order_no like concat('%',:order_no,'%') >>
<< and o.customer_order_no l... |
USE `LostandFound`;
DROP PROCEDURE
IF
EXISTS `proc_select_id_by_phone_number`;
delimiter //
CREATE PROCEDURE `proc_select_id_by_phone_number` ( IN `phone_number` CHAR ( 11 ) ) BEGIN
SELECT
`user`.`id`,
`user`.`security_question`
FROM
`LostandFound`.`user`
WHERE
`user`.`phone_number` = `phone_number`;
END ... |
-- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2015-12-28 17:30:31
-- 服务器版本: 5.5.46-0+deb8u1-log
-- PHP Version: 5.6.14-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
SELECT zobrazeni_urovne_id, rodic_id, list, computed_depth, typ, nazev_urovne, skartacni_znak, zamek, rozhodnuti
FROM (WITH RECURSIVE cte
(zobrazeni_urovne_id, rodic_id, poradi, expanded, sort_col, computed_depth, typ, list, nazev_urovne, skartacni_znak, zamek, rozhodnuti)
AS (SELECT zu.zobrazeni_urovne_id, zu.rodi... |
SELECT RobberId, Nickname, NoYears
FROM Robbers
WHERE NoYears > (Age/2);
|
/* Formatted on 18/03/2013 01:56:34 p.m. (QP5 v5.163.1008.3004) */
DECLARE
CURSOR CUR_CLPF05_NUMID
IS
SELECT TIPOID, NUMID, COFAAM
FROM EQ_CLPF05_FAM
WHERE RAMO IN (24, 02) AND TIPOID = 'M'
GROUP BY TIPOID, NUMID, COFAAM
ORDER BY TIPOID, NUMID;
CURSOR CUR_CLPF05
IS
... |
/*
Navicat MySQL Data Transfer
Source Server : wyy
Source Server Version : 50717
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-05-04 16:11:27
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------... |
SELECT * FROM LIKE_COMMENTS
WHERE DELETE_FLAG = 0
ORDER BY INSERT_DATETIME %s;
|
CREATE TABLE `weekevents`.`usereventscreates` (
`id` INT NOT NULL AUTO_INCREMENT,
`userId` INT NOT NULL,
`eventId` INT NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `id_UNIQUE` (`id` ASC));
|
USE RE7
SELECT
RECORDS.id
, RECORDS.is_constituent
, RECORDS.last_name
, RECORDS.first_name
, RECORDS.org_name
, PHONES.phonetypeid
, PHONES.num
, PHONES.DO_NOT_CALL
, ADDRESS.address_block
, ADDRESS.city
, ADDRESS.state
, ADDRESS.post_code
, ADDRESS.country
, CONSTIT_ADDRESS.type
, CONSTIT_ADDRESS.indi... |
/*
Unresolved questions -
1. some duplicate rows in tepsurveys - same latitude(0.000), longitue and date - validity in # surveys?
2. *surveys tables search only for first survey or even for recent survey? Reason - recent survey results
varying for memberintsurvey and *survey tables
3. what about last 12 months
*/... |
DROP TABLE IF EXISTS absence;
DROP SEQUENCE IF EXISTS absence_seq;
CREATE SEQUENCE absence_seq START WITH 10000;
CREATE TABLE absence (
id BIGINT NOT NULL PRIMARY KEY DEFAULT nextval('absence_seq'),
absence_date TIMESTAMP NOT NULL,
student_id BIGINT NOT NULL,
FOREIGN KEY (student_id) REFERENCES studen... |
-- phpMyAdmin SQL Dump
-- version 2.11.9.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 15, 2011 at 11:18 PM
-- Server version: 5.0.67
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTE... |
declare
v_TaskId Integer;
begin
v_TaskId := :TaskId;
update tbl_taskcc set col_name = col_name || '-' || to_char(col_id) where col_id = v_TaskId;
end; |
####. Day 1 SQL Code Along
select *,amount - payments as balance from loan;
SELECT loan_id, account_id, duration, status, (amount - payments)/1000 AS "Balance in thousands" FROM bank.loan;
SELECT duration FROM bank.loan;
SELECT * FROM bank.loan
WHERE status NOT IN (‘B’,’b’) AND amount > 100000;
SELECT * FROM ban... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 25, 2014 at 11:04 PM
-- Server version: 5.5.38-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
SELECT prog.credit_program,
prog.CREDIT_PROGRAM_ID,
prog_cr.full_credit_program_
FROM
(SELECT DISTINCT full_credit_program_nm
FROM DM_SM.CREDIT
WHERE GIVE_DT>=DATE'{0}-{1}-01'
AND GIVE_DT <DATE'{0}-{2}-01'
AND app_number IS NOT NULL
) prog_cr
LEFT JOIN
(SELECT * FROM !!!
ON prog_cr.full... |
show master status\G; |
-- =============================================
-- Author: Javier
-- Create date: September 2011
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE spDBManualInvoiceSelectTax
@countryId int
AS
BEGIN
SET NOCOUNT ON;
SELECT
TaxCodeId , TaxCode
FROM [Dimension.Ta... |
/*
Navicat MySQL Data Transfer
Source Server : momolela
Source Server Version : 50624
Source Host : 127.0.0.1:3306
Source Database : followmusic
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2016-11-07 07:32:07
*/
SET FOREIGN_KEY_CHECKS=0;
-... |
select sum(quantity) from cart; |
UPDATE tasks
SET
title = $3,
description = $4,
initial_estimate = $5
WHERE id = $1
AND project_id = $2; |
CREATE TABLE Editora(
id INT NOT NULL,
nome VARCHAR(255),
PRIMARY KEY(id)
)
CREATE TABLE Livro(
id INT NOT NULL,
ano INT,
autor VARCHAR(255),
titulo VARCHAR(255),
preco DECIMAL(10,2),
editora_id INT NOT NULL,
PRIMARY KEY(id),
FOREIGN KEY(editora_id) REFERENCES Autor(id)
)
|
CREATE TABLE "statuses" (
"status_id" TEXT NOT NULL,
"status_name" TEXT NOT NULL,
PRIMARY KEY("status_id")
); |
load data local infile '/home/nctuca/dinodino-extension/db_data/crawlCosData/cos_data.csv'
into table cos_data
fields terminated by ','
enclosed by '"'
lines terminated by '\n'
ignore 1 lines;
load data local infile '/home/nctuca/dinodino-extension/db_data/crawlCosData/cos_name.csv'
into table cos_name
fields terminat... |
#24 May 2018
CREATE TABLE `agent` (
`id` varchar(32) NOT NULL,
`name` varchar(100) NOT NULL,
`agent_code` varchar(20) NOT NULL,
`mobile_number` varchar(20) NOT NULL,
`created_by` varchar(32) DEFAULT NULL,
`created_on` datetime NOT NULL,
`updated_by` varchar(32) DEFAULT NULL,
`updated_on` datetime DEFAUL... |
ALTER TABLE `badge` DROP `show_evidence`; |
-- insert into to_magento_records
insert into to_magento_records (`record_id`, `identifier`, `type`, `status`)
values (6, 'XXX001', 2, 0);
-- insert into to_magento_datas
insert into to_magento_datas (record_id, field_name, field_value)
values (6, 'action', 1);
-- default store
insert into to_magento_datas (record_... |
insert into employee (id, full_name, reports_to, department, title)
values (1, 'Anthony Stark', null, 'Owner', 'Company Owner');
insert into employee (id, full_name, reports_to, department, title)
values (2, 'Matt Berry', 1, 'IT', 'Branch Manager');
insert into employee (id, full_name, reports_to, department, title)
... |
CREATE VIEW dbo.data_types_v
AS
SELECT ref_type, ref_value AS data_type, ref_name AS data_type_name
FROM dbo.sys_ref
WHERE (ref_type = 'DT')
|
-- prepare role
INSERT INTO `role` (id, role_name) VALUES(1, 'ADMIN');
INSERT INTO `role` (id, role_name) VALUES(3, 'APPROVER');
INSERT INTO `role` (id, role_name) VALUES(2, 'EDITOR');
-- prepare group
INSERT INTO group_ (id, name, parent_group_id) VALUES(1, 'CONTENT_GROUP', NULL);
INSERT INTO group_ (id, name, parent... |
DROP DATABASE IF EXISTS the_cocktail_menu;
CREATE DATABASE the_cocktail_menu; |
CREATE TABLE Product(
id IDENTITY,
code VARCHAR(50),
name VARCHAR(50),
brand VARCHAR(100),
description VARCHAR(250),
price DOUBLE,
quantity INT,
is_active BOOLEAN,
category_id INT,
user_id INT,
purchases INT DEFAULT 0,
views INT DEFAULT 0,
CONSTRAINT pk_product_id PRIMARY KEY (id),
CONSTR... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50538
Source Host : localhost:3306
Source Database : xblog
Target Server Type : MYSQL
Target Server Version : 50538
File Encoding : 65001
Date: 2014-09-22 16:21:54
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... |
CREATE DATABASE IF NOT EXISTS `foodbasket` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `foodbasket`;
-- MySQL dump 10.13 Distrib 5.5.9, for Win32 (x86)
--
-- Host: localhost Database: foodbasket
-- ------------------------------------------------------
-- Server version 5.5.13
/*!40101 SET @OLD_CHARACTE... |
-- replaced by 57 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.