text
stringlengths
6
9.38M
create table q_board( num number primary key, writer varchar(100), subject varchar(100), email varchar(100), content varchar(100), passwd varchar(100), reg_date date default sysdate, readcount number default 0, ip varchar(100), ref number, re_step number, ...
CREATE TABLE IF NOT EXISTS pokemon(id INTEGER PRIMARY KEY, name TEXT, type TEXT); ALTER TABLE pokemon ADD COLUMN hp TEXT DEFAULT 60;
alter table S_ZTLines add Z_CenterID Varchar(20), Z_LocationID Varchar(20)
set define off verify off feedback off whenever sqlerror exit sql.sqlcode rollback -------------------------------------------------------------------------------- -- -- ORACLE Application Express (APEX) export file -- -- You should run the script connected to SQL*Plus as the Oracle user -- APEX_050000 or as the owner ...
INSERT INTO classes (name, description, imagepath) VALUES ("Test", "A Test Class", "/images/test.png");
INSERT INTO real_estate.operation (operationID, type) VALUES (1, 'buy'); INSERT INTO real_estate.operation (operationID, type) VALUES (2, 'rent'); INSERT INTO real_estate.operation (operationID, type) VALUES (3, 'sell');
create table raw_features ( id integer NOT NULL AUTO_INCREMENT, created_at timestamp default current_timestamp, raw_features JSON, PRIMARY KEY (id) ); INSERT INTO raw_features (raw_features) VALUES ('{"median_age": 101}'); drop table raw_features; --docker run --name=root --env="MYSQL_ROOT_PASSWORD=my-sec...
SELECT DISTINCT Product.maker AS Maker FROM Product INNER JOIN PC ON Product.model = PC.model WHERE PC.speed >= 450;
-- 2. Aggregate with a drop and recompute logic DROP TABLE IF EXISTS {{.scratch_schema}}.session_goals_staged{{.entropy}}; CREATE TABLE {{.scratch_schema}}.session_goals_staged{{.entropy}} AS ( WITH goals AS ( SELECT sv.session_id, BOOL_OR(sv.screen_view_name = 'registration') AS has_started_regis...
--INVESTIGATE THE TABLES BEFORE JOINING SELECT * FROM [Sales].[SalesReason]; SELECT * FROM [Sales].[SalesOrderHeaderSalesReason] ORDER BY SalesOrderID; SELECT * FROM [Sales].[SalesOrderDetail] ORDER BY SalesOrderID; ---121317 --SALES REASON HAVE INCREASED THE NUMBER OF LINE ITEMS TO 131K - DUPLICATION Select * from [...
/* Navicat Premium Data Transfer Source Server : Local Source Server Type : MySQL Source Server Version : 50650 Source Host : localhost:3306 Source Schema : myapp Target Server Type : MySQL Target Server Version : 50650 File Encoding : 65001 Date: 04/01/2021 15:47:04...
-- 16/12/2015 - Image for pages ALTER TABLE `pages` ADD `header_image` VARCHAR(255) NULL AFTER `page_body`;
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50022 Source Host : localhost:3306 Source Database : changgx Target Server Type : MYSQL Target Server Version : 50022 File Encoding : 65001 Date: 2016-11-09 16:36:08 */ SET FOREIGN_KEY_CHECKS=0; -- -...
DROP DATABASE IF EXISTS bamazon_db; CREATE DATABASE bamazon_db; USE bamazon_db; CREATE TABLE bamazon( id INT(11) AUTO_INCREMENT NOT NULL, product VARCHAR(100) NULL, department VARCHAR (100) NULL, price INT(11) NULL, quantity INT (11) PRIMARY KEY (id) ); INSERT INTO bamazon (product, department, pric...
INSERT INTO `usuario` (`idUsuario`,`dniUsuario`,`claveUsuario`,`mailUsuario`,`authkey`,`activado`,`idRol`) VALUES (1,40960405,'caE6qCXEV/s2A','diegonmontes@gmail.com','1',1,1), (2,39354991,'caDGuJRIWiRPs','aluderosa@gmail.com','1',1,1), (3,34662680,'caVXPp5MKwxLQ','alewachu@gmail.com','1',1,1), (4,39523328,'caw9VuCEKK...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 17, 2020 at 03:48 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 TABLE IF NOT EXISTS credito (id_transacao INT AUTO_INCREMENT PRIMARY KEY, conta_id INT, valor_credito DECIMAL, cliente_id INT, tipo_conta VARCHAR(30)); INSERT INTO credito (conta_id, valor_credito, cliente_id, tipo_conta) VALUES (1500603806, 1000.00, 1, 'contacorrente'); INSERT INTO credito (conta_id, valor_...
select * from geoname where lower(name) like '%slov%' or lower(name) like '%cank%'
--************************************************************************************************************************************* --Created By: Brian Vander Plaats --Create Date: 10/16/2015 --Description: Retrieves a list of models based on a combination of filter fields --***************************************...
-- What are the 5 closest business to the Graduate School of Education building --(3700 Walnut St) that aren't owned by the Trustees of UPenn? select * from phl_business_licenses where not (legalname like '%UNIV%' and legalname like '%TRUS%') order by the_geom <-> st_setsrid(st_makepoint(-75.1972559094429, 39.9532426...
delete from Phones where Price <= 300
CREATE or REPLACE FUNCTION EURO4.info_cde( pNDOC VARCHAR(8), pState VARCHAR(50) ) RETURNS TABLE (Num_Doc CHAR(8), Date_Cde INTEGER, Num_Client CHAR(8), Code_Solde char(1), Article char(13), Qte_Cde decimal(11,3) ) LANGUAGE SQL NOT FENCED MODIFIES SQL DATA BEGIN DECLARE CONTINUE HANDLER FOR SQLEXCEPTION ...
-- AlterTable ALTER TABLE "Restaurant" ALTER COLUMN "latitude" DROP NOT NULL, ALTER COLUMN "longitude" DROP NOT NULL;
Drop TABLE core; Drop TABLE affiliate; Drop TABLE receive; Drop TABLE register; Drop TABLE purchase; Drop TABLE pay_roll; Drop TABLE work_as; Drop TABLE TA; Drop TABLE Teach; Drop TABLE belongs; Drop TABLE department; Drop TABLE student; Drop TABLE course; Drop TABLE faculty; Drop TABLE student_service; ...
 CREATE PROC [ERP].[Usp_Sel_AplicacionAnticipoSinAplicar] --1,1 @IdProveedor INT , @IdEmpresa INT AS BEGIN SELECT AA.ID, AA.ID, AA.Fecha, AA.Serie, AA.Documento, AA.Total, AA.TipoCambio, AA.IdMoneda, AA.Moneda, AA.IdTipoComprobante, AA.TipoComprobante, AA.IdPr...
# Insert Token INSERT INTO `token` ( `date_token`, `quantite_token`, `expire_token`, `paid_token`, `fk_produit`, `fk_combo`, `fk_client` ) VALUES ( NOW(), :quantite, :expire, :paid, :produit, :combo, :client );
CREATE OR REPLACE VIEW GW_MIGRA_NETAQUA.ELEMENT_TYPE AS SELECT 'AIXETA' id, 'true' active, 'true' code_autofill, 'Aixeta' descript, null link_path FROM DUAL UNION SELECT 'ARQFONT', 'true', 'true', 'Arqueta Font', null FROM DUAL UNION SELECT...
DECLARE message varchar2(20):= 'Hello World!'; BEGIN dbms_output.put_line(message); END; /
select prr.id, rig.caption, prr.profile_id, prr.right_id, rig.is_active from sec_profile_right as prr join sec_right as rig on rig.id = prr.right_id
-- Created by: Dennis Pallett (dennis@pallett.nl) -- July, 2014 -- add function signatures to SQL catalog create function pa_grid(pa_gridQuery text) returns table ( gkey bigint, pakey bigint ) external name neogeo.pa_grid; create function pa_grid_enhanced(pa_gridQuery text, sys string, tab string, ckey_c...
CREATE DATABASE db_generation_game_online; USE db_generation_game_online; CREATE TABLE tb_classe( id_classe INT AUTO_INCREMENT, Nome_Classe VARCHAR(20), Arma VARCHAR(20), Armadura VARCHAR(20), PRIMARY KEY(id_classe) ); CREATE TABLE tb_personagem( id_personagem INT AUTO_INCREMENT, Nome VARCHAR(50), Cor_Cabelo VARCHAR(...
/* File : todos.sql Project : kgmsjq-simple-todos Copyright (c) 2021 kangmasjuqi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without lim...
CREATE USER [CCB\dbconnprod] FOR LOGIN [CCB\dbconnprod];
CREATE EXTERNAL SCHEMA spectrum FROM data catalog DATABASE 'gdelt' IAM_ROLE 'arn:aws:iam::11111111:role/RedshiftS3ReadAccessRole' CREATE EXTERNAL DATABASE IF NOT EXISTS; CREATE EXTERNAL TABLE spectrum.mention ( globaleventid INT, eventtimedate INT, mentiontimedate INT, mentiontype INT, mentionsourc...
--Question Set #2.3 /* Finally, for each of these top 10 paying customers, I would like to find out the difference across their monthly payments during 2007. Please go ahead and write a query to compare the payment amounts in each successive month. Repeat this for each of these 10 paying customers. Also, it will be t...
-- 省市 drop table ss; create table ss( id text primary key not null, -- 省市代码 name text not null -- 省市名称 ); -- 学校 drop table school; create table school( id text primary key not null, -- 学校代码 name text not null, -- 学校名字 address_code text not null, -- 地区代码 address_name text not null, -- 地区名称 t...
CREATE TABLE saclie_01 ( CodClie varchar(15) not null primary key, Clave varchar(35), Acceso_Web tinyint(1) default 1, Preventa SMALLINT );
create table group9Temp as select min(group9_dicom_tags_pk_id) from group9_dicom_tags group by image_pk_id having count(*) > 1; delete g1 from group9_dicom_tags g1, group9Temp g2 where g1.group9_dicom_tags_pk_id = g2.group9_dicom_tags_pk_id; drop table group9Temp;
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Ven 29 Août 2020 à 11:29 -- Version du serveur : 5.6.21 -- Version de PHP : 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
SELECT load_extension('./mask'); CREATE TABLE section ( id INTEGER PRIMARY KEY, mask INTEGER NOT NULL, days TEXT NOT NULL, start_time TEXT NOT NULL, end_time TEXT NOT NULL );
with part as ( select * from {{ref('stg_tpch_sf1_part')}} ) select distinct part_id, p_name as name, p_mfgr as mfgr, p_brand as brand, p_type as type, p_size as size, p_container as container, p_retailprice as retailprice, p_comment as comment from part where part_item_rank = 1
/* 사용자 정보 (회원가입 시 입력) */ create table user_info( user_id varchar(20) primary key, user_passwd varchar(20) not null, user_name varchar(20) not null, user_gender varchar(3) not null, user_age int(10) not null, user_height int(20) not null, user_weight int(20) not null, user_phone varchar(20) ...
/* Navicat Premium Data Transfer Source Server : mysql5.7 Source Server Type : MySQL Source Server Version : 50730 Source Host : 10.168.30.17:3306 Source Schema : strack_test Target Server Type : MySQL Target Server Version : 50730 File Encoding : 65001 Date: 06/09/2...
#设置客户端连接服务器端编码 SET NAMES UTF8; #丢弃数据库sina,如果存在的话 DROP DATABASE IF EXISTS sina; #创建数据库sina,设置编码utf8 CREATE DATABASE sina CHARSET=UTF8; #进入数据库sina USE sina; #创建保存新闻数据的表news CREATE TABLE news( nid INT, title VARCHAR(32), ctime VARCHAR(10), #2019-07-02 content VARCHAR(3000), author VARCHAR(8), origin VARCHAR(8...
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.1.34-community /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNE...
SELECT COUNT(1) FROM --引落情報VIEW VIEW_WITHDRAW_DIVISION_INFO V WHERE --引落情報VIEW.回収ステータス = 依頼中 V.WITHDRAW_STATUS = CAST(/*dto.withdrawed*/ AS CHAR(1)) --引落情報VIEW.強制解約フラグ=OFF AND V.ENFORCE_END_AGREEMENT_SCHEDULED_FLG = CAST(/*dto.enforceEndAgreeSchFlg*/ AS CHAR(1)) /*IF (dto.withdrawDateFromSearch != null)*/ ...
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 19, 2020 at 12:48 PM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
INSERT INTO MEMBERS VALUES ('Harris', 'John', 'M', '219551234', '20013948', '4109391748'); INSERT INTO MEMBERS VALUES ('Henderson', 'Tina', 'X', '817263502', '20022954', '4108384598'); INSERT INTO MEMBERS VALUES ('Doni', 'Gwen', 'I', '219402198', '20033984', '4109392101'); INSERT INTO MEMBERS VALUES ('...
select InvoiceNumber, InvoiceDate, invoiceTotal from invoices where InvoiceID between 1 and 10 / 2 + 3 * 6 - 13 order by InvoiceNumber
PROMPT SET ECHO ON SELECT * FROM OSOBA; SET ECHO OFF PROMPT
CREATE TABLE BUILDING( BID VARCHAR2(50), BNAME VARCHAR2(50) NOT NULL, VERTEX_NUM NUMBER NOT NULL, BZONE SDO_GEOMETRY NOT NULL, CONSTRAINT "BUILDING_ID" PRIMARY KEY ("BID") ); INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID) ...
--调用这个存储过程,将会计算所有的数据库的今日结算数据 create or replace procedure proc_day_sparepart_all(in_todaykey in varchar2) as begin for store in ( select * from ems_store where type in (1,3) ) loop proc_day_sparepart(store.id,in_todaykey); END LOOP; end;
-- phpMyAdmin SQL Dump -- version 3.1.3.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 23-09-2015 a las 23:26:15 -- Versión del servidor: 5.1.33 -- Versión de PHP: 5.2.9 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Base de datos: `aulavirtualweb2015` -- -- -----------...
select 'Desactivation des contraintes de foreign keys' as '-------------------------------'; SET FOREIGN_KEY_CHECKS = 0; select 'Import de la structure des tables' as '-------------------------------'; -- -------------------------------------------------- -- Generated by Enterprise Architect Version 7.5.848 -...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 21 Mar 2019 pada 03.30 -- Versi server: 10.1.38-MariaDB -- Versi PHP: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
/* Programming for Data Science with Python Nanodegree Udacity's certified program > SQL practice > Lesson 3 : SQL Aggregations When was the earliest order (oldest) ever placed? You only need to return the date. */ SELECT MIN(o.occurred_at) earliest_order FROM orders o;
START TRANSACTION; DROP TABLE IF EXISTS additional_mentor_informations, mentors; CREATE TABLE mentors ( id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, family_name_ja VARC...
use tp_agence_voyages; -- Procédure d'ajout d'une note (trip_code, service_code, client_id, service_score) -- TODO: le client peut noter uniquement les voyages qu'il a fait -- le client doit avoir consommé le service OK DROP PROCEDURE IF EXISTS add_note; DELIMITER $$ CREATE PROCEDURE add_note ( IN trip_code_in IN...
CREATE table words( word_id mediumint NOT NULL AUTO_INCREMENT, word VARCHAR(30) NOT NULL, meang VARCHAR(150) NOT NULL, lang VARCHAR(20) NOT NULL, PRIMARY KEY(word_id) ); //to drop table DROP TABLE words; //chnage database engine ALTER TABLE words ENGINE = MYISAM; //to implement full text search ALTER TABLE words AD...
ALTER TABLE purchase ADD column party_id uuid; COMMENT ON COLUMN purchase.party_id IS 'id of the party that did the transfer'; ALTER TABLE purchase ADD FOREIGN KEY ("party_id") REFERENCES party ("id"); CREATE INDEX ON purchase ("party_id"); ALTER TABLE purchase ADD column user_id uuid; COMMENT ON COLUMN purchase.user_...
-- create database test create database test; -- for cmd write use test; use test; -- create table User create table User (id int(8) AUTO_INCREMENT, name varchar(25) NOT NULL, age int NOT NULL, isAdmin bit NOT NULL, createdDate timestamp, PRIMARY KEY (id));
update info set info_text = 'Вы совершили поездку, в качестве пассажира, в целях соблюдения человеческого этикета, вам стоило бы поблагодарить водителя. <div style="margin: 32px;text-align: center;"> <a style=" display: inline-block; text-decoration: none; text-transform: uppercase; letter-spacing: 1px; padd...
/* Database Systems, Coronel/Morris */ /* Type of SQL : MySQL DB Project - Sridhar Rangan and Sanjin Hodzic */ DROP SCHEMA IF EXISTS DB_20_GCS; CREATE SCHEMA DB_20_GCS; USE DB_20_GCS; CREATE TABLE REGION ( REGION_ID int, REGION_NAME varchar(50), PRIMARY KEY(REGION_ID) ); INSERT INTO REGION VALUES('1','NW'); INSE...
CREATE DATABASE IF NOT EXISTS `ma_users_service_production`; CREATE DATABASE IF NOT EXISTS `ma_users_service_staging`; CREATE DATABASE IF NOT EXISTS `ma_users_service_development`;
create view "postgres"."mint"."ad_fixed_total_model__dbt_tmp" as ( with __dbt__CTE__stg_d_date_model as ( with source_data as ( select * from "postgres"."mint"."d_date" ) select * from source_data ),d as (select * from __dbt__CTE__stg_d_date_model), bf as (select * from "postgres"."mint"."inter_budget_fixed_mod...
delete from follows where userID = $1 and followed_by=$2;
-- Schema: PIO -- Descomentar/comentar lineas que necesiten segun lo que tengan o no en sus computadoras DROP SCHEMA "PIO" CASCADE; CREATE SCHEMA "PIO" AUTHORIZATION postgres; -- GRANT ALL ON SCHEMA "PIO" TO postgres; -- Table: "PIO".administrador -- DROP TABLE "PIO".administrador; CREATE TABLE "PIO".administ...
select CAST(CASE WHEN isNumeric(stratum_1) = 1 THEN stratum_1 ELSE null END AS INT) as age_at_index, count_value as num_persons from @ohdsi_database_schema.heracles_results where analysis_id in (1800) and cohort_definition_id = @cohortDefinitionId
--DEALERSHIPS --info for later on --name, phoneNum, carStock [all from table] --dealership_id_from_dealership_page == the id shown on the form (site) --dealershipnameInput == the user input for form on site --dealershipphonenumInput == the user input for the dealership phone number on site --carStockInput == car stock ...
USE AuctionHouse; CREATE TABLE items ( itemID int AUTO_INCREMENT, name varchar(50), startPrice double, PRIMARY KEY (itemID) ); CREATE TABLE transactions ( itemID int, action varchar(50) ); CREATE TABLE users ( user_name varchar(20), password varchar(20), email varchar(20) ); INSERT INTO items (name, startPrice) VAL...
-- 数据库初始化脚本 -- 创建数据库 CREATE DATABASE seckill; -- 使用数据库 use seckill; -- 秒杀库存表 CREATE TABLE seckill( `seckill_id` bigint NOT NULL AUTO_INCREMENT COMMENT '商品库存Id', `name` varchar(120) NOT NULL COMMENT '商品名称', `number` int NOT NULL COMMENT '库存', `start_time` timestamp DEFAULT 0 NULL COMMENT '秒杀开始时间', `end_time`...
START TRANSACTION; CREATE DATABASE IF NOT EXISTS jat; USE jat; CREATE TABLE jat_user ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, login VARCHAR(25) NOT NULL, password VARCHAR(64) NOT NULL, email VARCHAR(50) NOT NULL, update_date DATETIME NOT NULL, update_user VARCHAR(25) NOT NULL, CONS...
/* default display */ /* 这里*/ SELECT ato.clear_status, ato.lock_status, ato.transaction_id, ato.locators, ato.flight_code, ato.create_time, ato.salesperson_code, ato.payment_type, concat(ato.currency, ' ', ato.received, ' | ', ato.received2, ' | ', ato.expense, ' | ', ato.total_profit) as 'transaction_details...
/* Exercise File: 1.03 Basics: Count, Min, and Max */ SELECT * FROM store_sales; SELECT * FROM store_sales LIMIT 10; SELECT count(*) FROM store_sales; SELECT Month_of_year, count(*) FROM store_sales GROUP BY month_of_year; SELECT MAX(employee_shifts) FROM store_sales; S...
set serveroutput on; DECLARE a_first_name employees.first_name%type; qlast_name employees.last_name%type; dBusinessDate Date; empRFec employees%Rowtype; TYPE EmppRecordTable is Table of employees.last_name%TYPE INDEX by SIMPLE_INTEGER; employeeLisrt EmppRecordTable; Type EmpRecord is record...
CREATE PROC [Maestro].[Usp_Sel_TipoCambioDiario_By_ArrayFecha]--'12/12/2016' @Fecha VARCHAR(MAX) AS BEGIN SELECT ID, Fecha, VentaSunat FROM ERP.TipoCambioDiario WHERE Fecha IN (SELECT CONVERT(DATETIME, DATA, 103) AS FECHA FROM [ERP].[Fn_SplitContenido] (@Fecha, ',')) UNION SELECT ID, Fecha, ...
DROP TABLE `Events`; DROP TABLE `Streams`; DROP TABLE `NewStreamEvents`;
-- ------------------------------------------------------------------------------------------------------- -- A SQL script for importing Brisbane GFTS data into database. -- ------------------------------------------------------------------------------------------------------- DROP DATABASE IF EXISTS transitdata; CRE...
-- 琩高Θ罿程蔼だ程だ㎝キАだ -- Α陪ボ揭祘ID, 揭祘name, 程蔼だ, 程だ, キАだ, の瞯 SELECT c.c_id, c.c_name, MAX(sc.s_score) AS [Max score], MIN(sc.s_score) AS [Min score], AVG(sc.s_score) AS [Avg score], AVG(case when sc.s_score >= 60 then 1.0 else 0.0 end ) as [Passrate] FROM course c JOIN score sc ON c.c_id = sc.c_id GROUP BY c.c_id, ...
select 1 , 'foo' as "f" , bar as b from TABNAME where 1 = 1 and 2 = 2 and col1 = :c1 and col1 = 'ABC' ;
INSERT INTO seis_acquisition VALUES ('CSSC-65', '1965-01-01', 2000, 'Ferdig', 'Nordsjøen', 'Ordinær seismisk undersøkelse', '2D', 'Esso Exploration and Production Norway A/S', '1965-12-31', '1965-01-01', '1965-12-31', 2338, NULL, NULL, NULL, NULL, NULL, '2013-05-08'); INSERT INTO seis_acquisition VALUE...
-- ---- DROP IN THIS SEQUENCE -- drop table et_payments; drop table et_audit; drop table et_user_expense; drop table et_expense; drop table et_user_settlement; drop table et_reports; drop table et_settlement; drop table authorities; drop table roles; drop table users;
create or replace view fmv_bomagguptodown as select vn.prv_cle key ,d.sel_em_addr FromID ,vn.sel_cle fromname ,n.nmc_field --,vn.sel_desc --,n.fils_pro_nmc ,n.qute ,NL.aggnodeid ToID ,n.fils_pro_nmc PID ,d.geo5_em_addr STID ,d.dis6_em_addr TCID --,NL.name --,NL.description --,f1.f_cle ,f2.f_cle ,f2.f_desc /*,case when ...
ALTER TABLE war_config ADD COLUMN pc BOOLEAN; ALTER TABLE war_config ADD COLUMN status jsonb;
------------------------------------------- CREATE OR REPLACE VIEW public.community_jobs_sector AS ( SELECT c.id AS bfs_id, c.name, j.sector, COUNT(*) AS job_count FROM communities AS c INNER JOIN community_jobs AS j ON c.id = j.community_id GROUP BY c.id, c.name, ROLLUP...
SELECT A.LoteID, A.LoteNombre, B.VariedadNombre, B.VariedadID,A.FundoID FROM TB_Lote AS A LEFT JOIN TB_Variedad AS B ON A.VariedadID = B.VariedadID WHERE B.AfectoVenta=1 AND A.AfectoVenta=1 ORDER BY 2 UNION ALL SELECT A.LoteID, A.LoteNombre, B.VariedadNombre, B.VariedadID,A.FundoID FROM TB_Lote AS A LEFT JOIN TB_Varied...
alter database DEV_INFG_CelulaQualidade_DSV set offline with rollback immediate
-- Creates missing index for account_id column on event and behavior_group CREATE INDEX ix_event_account_id ON event USING btree (account_id); CREATE INDEX ix_behavior_group_account_id ON behavior_group USING btree (account_id);
CREATE TABLE project ( name character varying(256) NOT NULL, owner_user_id id NOT NULL, description character varying(65536) NOT NULL, PRIMARY KEY (id) ) INHERITS (node); CREATE TABLE issue_location ( name character varying(256) NOT NULL, description character varying(65536) NOT NULL,...
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Май 04 2017 г., 17:48 -- Версия сервера: 5.7.18-0ubuntu0.16.04.1 -- Версия PHP: 7.0.15-0ubuntu0.16.04.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
-- Local database definition. CREATE DATABASE BucketList; CREATE TABLE `BucketList`.`tbl_user` ( `user_id` BIGINT NOT NULL AUTO_INCREMENT, `user_name` VARCHAR(45) NULL, `user_username` VARCHAR(45) NULL, `user_password` VARCHAR(45) NULL, PRIMARY KEY (`user_id`)); USE BucketList; INSERT INTO ...
#1) Add the reviewer Roger Ebert to your database, with an rID of 209. insert into Reviewer values (209, 'Roger Ebert'); #2) Insert 5-star ratings by James Cameron for all movies in the database. Leave the # review date as NULL. insert into Rating select rID, mID, 5, null from Reviewer, Movie where name = 'Jam...
select hr1.stratum_1 as calendar_month, substring(hr1.stratum_1,1,4) as calendar_year, substring(hr1.stratum_1,5,2) as calendar_month_index, hr1.count_value as num_persons, round(1000*(1.0*hr1.count_value / t1.count_value),5) as y_prevelance_1000pp from (select stratum_1, count_value from @resultsSchema.dbo.herac...
drop view Employees_Info_VW; Create or Replace view Employees_Info_VW as Select a.employee_id as emp_id ,a.last_name ||' '|| a.first_name as emp_full_name ,b.employee_id as manager_id ,b.last_name ||' '|| b.first_name as manager_full_name ,a.email ,a.salary ,a.hire_date ...
CREATE TABLE IF NOT EXISTS `carro` ( `codigo` BIGINT(20) NOT NULL AUTO_INCREMENT, `marca` VARCHAR(100) NOT NULL, `modelo` VARCHAR(100) NOT NULL, `placa` VARCHAR(50) NULL DEFAULT NULL, PRIMARY KEY (`codigo`) USING BTREE ) ;
/* Formatted on 17/06/2014 18:17:52 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.VTMCREI_POSIZIONI_LAVORABILI ( COD_ABI, COD_NDG, COD_SNDG, FLG_LAVORABILE, FLG_SNDG_LAVORABILE ) AS SELECT DISTINCT /*+ FIRST_ROWS(10) */ cod_abi, cod_ndg, cod_sndg, ...
INSERT INTO "field_activity_status_hst" VALUES ('ALBUSKJELL', TO_DATE('1975-04-25','yyyy-mm-dd'), TO_DATE('1979-05-26','yyyy-mm-dd'), 'PDO APPROVED', 43437, TO_DATE('9999-12-31','yyyy-mm-dd'), TO_DATE('2013-05-08','yyyy-mm-dd')); INSERT INTO "field_activity_status_hst" VALUES ('ALBUSKJELL', TO_DATE('1979-05-26'...
CREATE TABLE SUPPLIERS( SUPPLIERS_ID NUMBER, CONSTRAINT SUPPLIERS_PK PRIMARY KEY (SUPPLIERS_ID), COMPANY_NAME NVARCHAR2(50), CONTACT_TITLE NVARCHAR2(20), ADDRESS NVARCHAR2(70), CITY NVARCHAR2(20), REGION NUMBER, POSTAL_CODE NUMBER, COUNTRY NVARCHAR2(20), PHONE NVARCHAR2(20), FAX NVARCHAR2(20), HOME_PAGE NVARCHAR2(100) ...
DROP TABLE star1; DROP TABLE star2; DROP TABLE star3; DROP TABLE star4; DROP TABLE gas1; DROP TABLE gas2; DROP TABLE gas3; CREATE TABLE star1 ( iOrder integer PRIMARY KEY, mass integer, pos_x integer, pos_y integer, pos_z integer, vx integer, vy integer, vz ...
CREATE TABLE CHAMPION_TAG ( CHAMPION_ID INT, TAG VARCHAR(255), PRIMARY KEY (CHAMPION_ID, TAG), FOREIGN KEY (CHAMPION_ID) REFERENCES CHAMPION (ID) );